https://github.com/kovidgoyal/calibr...s_india.recipe
feed based, remove_tags and preprocess images
Code:
remove_tags = [
classes(
'story_title storyCollection shareBar sr_widget_free jsSrWidgetFree srwidgetfree_3'
' sr_paid jsSrWidgetPaid ar_wrp arwd_ld_chk adBox custom_ad mgid orn_free_r bold'
),
]
Code:
def preprocess_html(self, soup):
for image in soup.findAll('img', attrs={'src': True}):
image['src'] = image['src'].replace("width-300", "width-640")
for img in soup.findAll('img', attrs={'data-original': True}):
img['src'] = img['data-original'].replace('photo', 'thumb').replace('quality-100', 'quality-100,width-600,resizemode-4')
return soup
add the bold part of above code to this print edition too.
https://github.com/kovidgoyal/calibr...edition.recipe