Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2010, 11:09 PM   #1
bthoven
Evangelist
bthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enough
 
bthoven's Avatar
 
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.
bthoven is offline   Reply With Quote
Old 03-13-2010, 07:54 AM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by bthoven View Post
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.
The short answer is you don't have to tweak - it's done automatically. The long answer is - it's only done automatically if the image is on the page of the article that the RSS feed points to. There are lots of ways to "tweak" - too many to list here.
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.
Starson17 is offline   Reply With Quote
Advert
Old 03-13-2010, 10:22 AM   #3
bthoven
Evangelist
bthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enough
 
bthoven's Avatar
 
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.
bthoven is offline   Reply With Quote
Old 03-13-2010, 04:32 PM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by bthoven View Post
Can you try the above two links in my original post? the photos won't come.
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.
Starson17 is offline   Reply With Quote
Old 03-14-2010, 03:05 AM   #5
bthoven
Evangelist
bthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enough
 
bthoven's Avatar
 
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.
bthoven is offline   Reply With Quote
Advert
Old 03-14-2010, 08:55 AM   #6
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by bthoven View Post
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.
Because you asked nicely, and because it's Hubble and space related, I checked out the first feed:
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.
Starson17 is offline   Reply With Quote
Old 03-14-2010, 11:10 AM   #7
bthoven
Evangelist
bthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enough
 
bthoven's Avatar
 
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?
bthoven is offline   Reply With Quote
Old 03-14-2010, 01:38 PM   #8
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by bthoven View Post
I simply add the link through calibre interface, no advanced customization from the standard coding. Could you share your recipe?
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')
             ]
Starson17 is offline   Reply With Quote
Old 03-14-2010, 11:03 PM   #9
bthoven
Evangelist
bthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enoughbthoven will become famous soon enough
 
bthoven's Avatar
 
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?
bthoven is offline   Reply With Quote
Old 03-15-2010, 07:49 AM   #10
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by bthoven View Post
Hi Starson17,

Your script works, ie. the photos come, but also many other hyperlinks.
Yes, I know. I was testing to see if the photos would be correctly pulled. I didn't put in any of the restrictions that would have removed other items.


Quote:
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:

What are the key coding differences which pull out the photos in your script?
I'd have to test, but it's probably one of these:
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.
Starson17 is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 06:40 AM.


MobileRead.com is a privately owned, operated and funded community.