Project Syndicate update

This commit is contained in:
unkn0w7n 2023-11-01 10:30:36 +05:30
parent 600760c170
commit dc1e4de91f
2 changed files with 7 additions and 3 deletions

View File

@ -28,12 +28,12 @@ class outlook(BasicNewsRecipe):
remove_tags = [
classes(
'social_sharing_article left_trending left-sticky __tag_links next_prev_stories '
'downarrow uparrow more_from_author_links next prev __related_stories_thumbs'
'downarrow uparrow more_from_author_links next prev __related_stories_thumbs home_ad_title'
)
]
def get_browser(self):
return BasicNewsRecipe.get_browser(self, user_agent='common_words/based')
return BasicNewsRecipe.get_browser(self, user_agent='common_words/based', verify_ssl_certificates=False)
def parse_index(self):
soup = self.index_to_soup('https://www.outlookindia.com/magazine')

View File

@ -11,6 +11,7 @@ class projectsynd(BasicNewsRecipe):
'leaders, and civic activists from around the world, we provide news media and their readers with cutting-edge '
'analysis and insight, regardless of ability to pay. Our membership includes over 500 media outlets more '
'than half of which receive our commentaries for free or at subsidized rates in 156 countries. '
'Download Weekly.'
)
language = 'en'
no_stylesheets = True
@ -35,17 +36,20 @@ class projectsynd(BasicNewsRecipe):
[itemprop^="associatedMedia"]{ font-size:small; text-align:center; }
[itemprop="author"], time { font-size:small; }
.sub, em { font-style:italic; color:#202020; }
[data-page-area="article-bottom"] { font-size:small; color:#202020; }
'''
keep_only_tags = [
dict(attrs={'itemprop':lambda x: x and 'associatedMedia' in x.split()}),
dict(attrs={'itemprop':['headline', 'datePublished', 'author', 'abstract', 'articleBody']}),
dict(name = 'aside', attrs={'data-page-area':'article-bottom'})
]
remove_tags = [
dict(name=['button', 'svg']),
dict(attrs={'data-message-area':True}),
dict(attrs={'id':['editorspicks', 'movie_player']}),
dict(name='aside', attrs={'id':lambda x: x and x.startswith('comments-')})
]
feeds = [