|
|
Thread Tools | Search this Thread |
07-04-2022, 10:06 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jul 2021
Location: West Bengal
Device: Kindle Paper White 11th Gen
|
Recipe fails to download some images due to slow loading of the images
Hi,
I have modified 'The Hindu' recipe already available to fetch news/articles from the Hindu for fetching news and articles from the Ananda Bazar Patrika, a bengali daily. The script works fine meaning the 'feeds' is okay, but it downloads some image place holders (a white image showing the newspaper name) instead of the real images, which take a bit of time to appear on the place holders in the webpage. As a result, with other images related to the articles, I am getting some annoying image place holders in the final epub version. Could anyone help me with this so that calibre could wait for a bit for appearing the images and then start fetching it from there? Thanks in advance. With Best Regards |
07-05-2022, 01:25 AM | #2 |
Fanatic
Posts: 534
Karma: 82770
Join Date: May 2021
Device: kindle
|
try adding this to the recipe and check.
Code:
def preprocess_html(self, soup): for img in soup.findAll('img', attrs={'data-src': True}): img['src'] = img['data-src'] return soup |
Advert | |
|
07-05-2022, 01:05 PM | #3 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Jul 2021
Location: West Bengal
Device: Kindle Paper White 11th Gen
|
Quote:
Definitely I will upload it, actually I am trying to make the script clean. Once it is done, I will upload the recipe here. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to make Pocket recipe download ALL images from each article and not just one? | Pino76 | Recipes | 1 | 10-29-2015 12:15 PM |
build-in scmp recipe didn't download images | timoy_kindle | Recipes | 1 | 09-27-2014 07:40 AM |
FAZ.NET recipe fails due to website redesign | juco | Recipes | 7 | 10-07-2011 11:53 AM |
Fails to export images? | st_albert | Writer2ePub | 4 | 07-20-2011 05:47 PM |
slow loading of images on my jetbook | jcarlos | Ectaco jetBook | 3 | 09-07-2009 12:01 AM |