Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2012, 06:02 PM   #1
atlantique
Junior Member
atlantique began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2010
Device: kindle dx
problematic uri, containing a redirection

I had a very primitive, but working recipe, based on a rss feed.
However whenever my feed includes a uri with redirection, the recipe
fails to load it. Here is an example:

<pre>
http://www.google.com/url?sa=t&rct=j...1Ik6Kovq5xg%22
</pre>

Does anybody know how to make this type of uri work as given above?

If one clicks on this hyperlink using the feed, it works without any problem.
But calibre fails to load it. And the recipe quits, apparently because
of the failure to load the contents of the uri quoted above.

Usually nytimes.com articles can be downloaded just by using an appropriate
referer, but I would like to keep the feed as it is.

Here is the rss feed. It is a primitive feed created using feed43.com
The article with the problematic uri is (at this moment) in the ninth position.

<pre>
http://www.feed43.com/8330834560181458.xml
</pre>

Thanks in advance for any suggestions.
atlantique is offline   Reply With Quote
Old 01-17-2012, 05:53 AM   #2
roedi06
Junior Member
roedi06 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jan 2012
Device: SONY PRS-T1
I think you need a different approach. On the bottom of google news there is a RSS-feed (orange icon), you need to put the corresponding link to the feed in a Recipe.
roedi06 is offline   Reply With Quote
 
Enthusiast
Old 01-22-2012, 01:14 PM   #3
Divingduck
Fanatic
Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.
 
Posts: 558
Karma: 59934
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
@atlanique
You may look here in the forum at the sticky thread "re-usable code", post 14 from kiklop74: link. This will exlain and solve your problem.
Here is an example how to integrate it your RSS-Feed:
Spoiler:
Code:
__license__   = 'GPL v3'
__copyright__ = ''
'''
Fetch Feed Antiwar.com
'''

from calibre.web.feeds.recipes import BasicNewsRecipe
class Antiwar_com(BasicNewsRecipe):
    title          = u'Antiwar.com' # 2011-12-28 AGe
    description = '-Antiwar.com-'
    publisher = 'Antiwar.com'
    category = 'RSS-News, US'
    __author__ = 'Armin Geller' # 2012-01-22 AGe
    language = 'en'
    lang = 'en-US'
    encoding = 'utf-8'
    timefmt = ' [%a, %d %b %Y]'

    oldest_article = 7
    max_articles_per_feed = 50
    no_stylesheets = True
    auto_cleanup = True
    remove_javascript = True

    feeds = [
              (u'Latest Viewpoints - Antiwar.com', u'http://www.feed43.com/8330834560181458.xml'),

             ]

    def print_version(self, url):
          return self.browser.open_novisit(url).geturl() + '&pagewanted=print'

Last edited by Divingduck; 01-22-2012 at 01:17 PM.
Divingduck is offline   Reply With Quote
Old 05-02-2012, 04:51 PM   #4
atlantique
Junior Member
atlantique began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2010
Device: kindle dx
Divingduck: Thank you very much for your suggestion. It was exactly what I was looking for. Sorry for not having acknowledged your help in a more timely fashion you.
atlantique is offline   Reply With Quote
Old 05-03-2012, 01:02 AM   #5
Divingduck
Fanatic
Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.
 
Posts: 558
Karma: 59934
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Thanks for your reply. Fine to read it works for you.
Divingduck is offline   Reply With Quote
Reply

Tags
problematic uri

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a problematic HTML to epub redryder Conversion 1 05-30-2011 09:54 PM
Nikkei/Problematic site that need form-post before processing miurahr Recipes 6 11-21-2010 01:27 PM
Update on problematic pdf sarikan iRex 5 01-20-2009 11:10 AM
Redirection script for mobile browsers Alexander Turcic Lounge 0 08-01-2005 05:26 PM


All times are GMT -4. The time now is 12:56 AM.


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