-
Notifications
You must be signed in to change notification settings - Fork 107
LBC publisher integrated #814
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
addie9800
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.
Thanks for adding the first Lebanese publisher. Unfortunately, the code you provided does not run. I have commented on the relevant section, so that you can go ahead and fix it.
| domain = "https://www.lbcgroup.tv", | ||
| parser = LBCGroupParser, | ||
| sources=[ | ||
| RSSFeed("https://www.lbcgroup.tv/Rss/latest-news/en"), |
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.
Since the default language is arabic, please add the following parameter to to each English source languages={"en"}. Also, since there is an arabic RSSFeed, please add that as well: RSSFeed("https://www.lbcgroup.tv/Rss/latest-news/ar")
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.
I think we can add all RSSFeeds from https://www.lbcgroup.tv/rss/ar and https://www.lbcgroup.tv/rss/en
| parser = LBCGroupParser, | ||
| sources=[ | ||
| RSSFeed("https://www.lbcgroup.tv/Rss/latest-news/en"), | ||
| NewsMap("https://www.lbcgroup.tv/newssitemap.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.
This this source is multi-lingual, please override the language with languages={"en", "ar"}
| sources=[ | ||
| RSSFeed("https://www.lbcgroup.tv/Rss/latest-news/en"), | ||
| NewsMap("https://www.lbcgroup.tv/newssitemap.xml"), | ||
| Sitemap("https://www.lbcgroup.tv/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.
I think this sitemap can safely be removed, at least I didn't find any articles that weren't also part of the Newsmap. And more problematically, there were numerous pages that were not relevant to Fundus.
| # Use the defined content_selector to locate the block of text. | ||
| return extract_article_body_with_selector( | ||
| self.precomputed.doc, | ||
| content_selector=self._content_container_selector, |
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.
This line does not really make sense and causes the program to crash. You have defined the selector as content_container_selector and try to access it as _content_container_selector. Also, extract_article_body_with_selector has no parameter content_selector.
No description provided.