-
Notifications
You must be signed in to change notification settings - Fork 107
add klassegegenklasse (DE) publisher + parser + tests + tables #809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Added publisher Klasse gegen Klasse(DE)
|
MaxDall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baurlaur Thanks a lot for the massive amount of work you put into this 🚀 Some minor things: Would you mind adding title and image_extraction as well?
| Sitemap( | ||
| "https://www.klassegegenklasse.org/wp-sitemap.xml", | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the sitemap includes a lot of unnecessary entries. You can use the sitemap_filter parameter of Sitemap to exclude unwanted sitemap URLs. For example, sitemap_filter=inverse(regex_filter("wp-sitemap-posts-post")) will exclude any sitemap that does not contain the substring wp-sitemap-posts-post.
| nodes = self.precomputed.doc.xpath( | ||
| "//a[@rel='author']/text()" | ||
| " | //span[contains(@class,'author')]//a/text()" | ||
| " | //div[contains(@class,'author')]//a/text()" | ||
| " | //div[contains(@class,'byline')]//a/text()" | ||
| " | //span[contains(@class,'byline')]//a/text()" | ||
| " | //a[contains(@href,'/autor/') or contains(@href,'/author/')]/text()" | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicking through some of the articles it seems to me that the author can usually be found at the same place. Could you elaborate on your reasoning for adding all the extra selectors?
| @attribute | ||
| def publishing_date(self) -> Optional[datetime]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as with authors. It seems that the publishing date of an article is displayed at the same location for the articles i encountered so far. Could you elaborate why you added the extra fall-backs?
No description provided.