from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1282101454(BasicNewsRecipe): title = 'How To Geek' language = 'en' __author__ = 'TonytheBookworm' description = 'Daily Computer Tips and Tricks' publisher = 'Howtogeek' category = 'PC,tips,tricks' oldest_article = 2 max_articles_per_feed = 100 linearize_tables = True no_stylesheets = True remove_javascript = True use_embedded_content = False keep_only_tags = [ dict(id='main') ] remove_tags_after = dict(classes='affiliate-disclosure') remove_tags = [ dict(name='a', attrs={'target': ['_blank']}), dict(name='table', attrs={'id': ['articleTable']}), dict(name='div', attrs={'class': ['feedflare', 'article-share-widgets', 'related-articles', 'comments']}), ] 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