Add SVT news recipe

Bug #1690612 reported by Jonatan Nyberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

I made a news recipe for SVT news. Only thing is that images are not displayed in the news but I couldn't figure out how to get them to show, would you know?

Revision history for this message
Jonatan Nyberg (bugreporter41) wrote :
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1690612

Generally when images are missing it means the website is using some
kinfd of trick to load the images, to get reponsive images, perhaps.
Look at the img or picture tags, often they have data-src or <source>
some other such attribute with the real URL to the images. In that case
you implement preprocess_html in your recipe and copy over the correct
URL to the <img> tags src attribute.

Revision history for this message
Jonatan Nyberg (bugreporter41) wrote :

The images were loaded when I didn't add the auto_cleanup = True line but then the rest looked strange, I don't know how to have both.
I also tried adding
auto_cleanup_keep = '//div[@class="thumbnail"]'
    auto_cleanup_keep = '//div[@id="article-image"]'
    auto_cleanup_keep = '//div[@id="article-image"]|//span[@class="important"]'

Revision history for this message
Kovid Goyal (kovid) wrote :

auto cleanup is very much you get what you get, it;s difficult to
customize. Instead use keep_only_tags and remove_tags, turning off
auto_cleanup

Kovid Goyal (kovid)
Changed in calibre:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.