https://github.com/kovidgoyal/calibr...merican.recipe
scientific american cover and tags
line 14
Code:
keep_classes = {'article-header', 'article-content',
'article-media', 'article-author', 'article-text',
'feature-article--header', 'feature-article--header-title',
'opinion-article__header-title', 'author-bio' }
remove_classes = {'aside-banner', 'moreToExplore', 'article-footer', 'flex-column--25', 'article-author__suggested'}
remove line 60 and add below lines after line 63 (there's better cover in issue page)
Code:
select = Select(self.index_to_soup(url, as_tree=True))
cover = [x.get('src', '') for x in select('main .product-detail__image img')][0].split('?')[0]
self.cover_url = cover + '?w=800'
feeds = []
the + '?w=800' is to reduce the size.. the actual image is like 8k resolution - 1mb file
and masthead_url = 'https://static.scientificamerican.com/sciam/assets/Image/newsletter/salogo.png'