Skip to content
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

Add La Vanguardia #637

Open
wants to merge 5 commits into
base: add-abc
Choose a base branch
from
Open

Add La Vanguardia #637

wants to merge 5 commits into from

Conversation

addie9800
Copy link
Collaborator

No description provided.

@addie9800 addie9800 changed the base branch from master to add-abc October 15, 2024 18:47
# Conflicts:
#	src/fundus/publishers/es/__init__.py
Copy link
Collaborator

@MaxDall MaxDall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for adding 👍

Comment on lines 50 to 52
NewsMap("https://www.lavanguardia.com/newsml/home.xml"),
RSSFeed("https://www.lavanguardia.com/rss/home.xml"),
RSSFeed("https://www.lavanguardia.com/rss/internacional.xml"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seem to be sitemaps as well https://www.lavanguardia.com/sitemap-noticias-202102.xml.gz as well as two other NewsMaps:
https://www.lavanguardia.com/sitemap-google-news.xml
https://www.lavanguardia.com/sitemap-news-agencias.xml

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah perfect, I missed them


@attribute
def authors(self) -> List[str]:
return generic_author_parsing(self.precomputed.ld.bf_search("author"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some encoding errors for the author field when parsing this article.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out, it seems to be the case that, if there is this ZWSP character, it seems to be followed by information unrelated to the author, so it can safely be just removed

_summary_selector = XPath("//h2[@class='epigraph']")

@attribute
def body(self) -> Optional[ArticleBody]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The selector seems to have trouble parsing this article

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me, as if there is nothing we can do about it, since the content is loaded using a script. The HTML we get in Fundus seems to mostly be scripts

Comment on lines 43 to 44
def topics(self) -> List[str]:
return generic_topic_parsing(self.precomputed.meta.get("Keywords"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One could argue that the topics at the page's bottom are more descriptive. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants