This commit is contained in:
Kovid Goyal 2023-11-01 11:24:47 +05:30
commit 9b97543bef
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
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

@ -10,7 +10,8 @@ class projectsynd(BasicNewsRecipe):
'Featuring exclusive contributions by prominent political leaders, policymakers, scholars, business '
'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.'
'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 = [