Update Howto Geek

This commit is contained in:
Kovid Goyal 2018-09-06 11:51:32 +05:30
parent 77bd4f4544
commit 8452127896
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -13,14 +13,22 @@ class AdvancedUserRecipe1282101454(BasicNewsRecipe):
linearize_tables = True
no_stylesheets = True
remove_javascript = True
masthead_url = 'http://blog.stackoverflow.com/wp-content/uploads/how-to-geek-logo.png'
remove_tags = [dict(name='a', attrs={'target': ['_blank']}),
dict(name='table', attrs={'id': ['articleTable']}),
dict(name='div', attrs={'class': ['feedflare']}),
]
keep_only_tags = [
dict(id='main')
]
remove_tags = [
dict(name='a', attrs={'target': ['_blank']}),
dict(name='table', attrs={'id': ['articleTable']}),
dict(name='div', attrs={'class': ['feedflare', 'article-share-widgets']}),
]
feeds = [
('Tips', 'http://feeds.howtogeek.com/howtogeek')
]
def preprocess_html(self, soup, *a):
for img in soup.findAll('img', attrs={'data-pagespeed-lazy-src': True}):
img['src'] = img['data-pagespeed-lazy-src']
return soup