03-11-2010, 11:09 PM | #1 |
Evangelist
Posts: 475
Karma: 590
Join Date: Aug 2009
Location: Bangkok, Thailand
Device: Kindle Paperwhite
|
How to include images/photos in the enews?
Sorry if this has been asked in the past.
I find a few rss site which has photos which I intend to include in the fetched enews. How do I tweak the recipe to include those images. For example: http://www.sciencedaily.com/rss/space_time.xml http://hubblesite.org/newscenter/newscenter_rss.php Thanks in advance. |
03-13-2010, 07:54 AM | #2 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Calibre can always get the image, but you need to look at the page to find out where the image is. That will tell you how to tweak to get it to appear. |
|
Advert | |
|
03-13-2010, 10:22 AM | #3 |
Evangelist
Posts: 475
Karma: 590
Join Date: Aug 2009
Location: Bangkok, Thailand
Device: Kindle Paperwhite
|
Can you try the above two links in my original post? the photos won't come.
|
03-13-2010, 04:32 PM | #4 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Sorry, I'm swamped. Try posting your recipe in the main recipe thread. I wasn't trying to say that every image can automatically be pulled, just that you don't have to do anything to get normal images. If they don't get pulled, then there's something going on preventing it, and you need to track down why. I just wrote a recipe that pulled one set of images that was different from what appeared on the web page. It turned out to be a referer [sic] issue. In your case, it could be that, or cookies, or scripts, or login issues or any of many different things.
Last edited by Starson17; 03-14-2010 at 08:39 AM. |
03-14-2010, 03:05 AM | #5 |
Evangelist
Posts: 475
Karma: 590
Join Date: Aug 2009
Location: Bangkok, Thailand
Device: Kindle Paperwhite
|
Thanks for trying. Just want to have some clue why it can't pull the photos.
I may have to go deeper in more technical knowledge. Thanks again. |
Advert | |
|
03-14-2010, 08:55 AM | #6 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
http://www.sciencedaily.com/rss/space_time.xml It pulled the photos for me with the most basic Calibre recipe possible. What are you seeing? You'll need to post your recipe and explain the problem to debug further. |
|
03-14-2010, 11:10 AM | #7 |
Evangelist
Posts: 475
Karma: 590
Join Date: Aug 2009
Location: Bangkok, Thailand
Device: Kindle Paperwhite
|
I simply add the link through calibre interface, no advanced customization from the standard coding. Could you share your recipe?
|
03-14-2010, 01:38 PM | #8 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Code:
from calibre.web.feeds.news import BasicNewsRecipe class Test(BasicNewsRecipe): title = 'Test' __author__ = 'Starson17' description = 'Test' language = 'en' use_embedded_content= False no_stylesheets = True oldest_article = 24 remove_javascript = True feeds = [ (u'Current Feed', u'http://www.sciencedaily.com/rss/space_time.xml') ] |
|
03-14-2010, 11:03 PM | #9 |
Evangelist
Posts: 475
Karma: 590
Join Date: Aug 2009
Location: Bangkok, Thailand
Device: Kindle Paperwhite
|
Hi Starson17,
Your script works, ie. the photos come, but also many other hyperlinks. Here is the default script when I simply create it from Calibre gui without any modification, and it show only the feed content without photos: class AdvancedUserRecipe1268622019(BasicNewsRecipe): title = u'Science Daily - Space & Time (calibre default)' oldest_article = 7 max_articles_per_feed = 100 feeds = [(u'Science Daily - Space & Time (calibre default)', u'http://www.sciencedaily.com/rss/space_time.xml')] What are the key coding differences which pull out the photos in your script? |
03-15-2010, 07:49 AM | #10 | ||
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
use_embedded_content= False no_stylesheets = True remove_javascript = True Just add them one at a time, then read my recent posts in the recipe thread for how to remove the extra junk. |
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Firmware Update What a 2.6 update should include.... | Sheikspeare | Amazon Kindle | 33 | 05-26-2010 10:12 AM |
How to include a pdf crop plugin. | Hanselda | Plugins | 3 | 04-28-2009 08:35 AM |
Save file include jpeg | RandallFlagg | Calibre | 3 | 02-10-2009 11:11 PM |
include isbn when saving to harddisk | Snuser | Calibre | 7 | 02-09-2009 08:30 PM |
Should we include the PG .txt files in our distributions? | phrodod | Sony Reader | 16 | 09-15-2007 12:38 AM |