Register Guidelines E-Books Today's Posts Search

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 04-28-2009, 11:06 AM   #496
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
This is improved and updated recipe for spiegel online in german.

@Kovid
Please update the recipe
Attached Files
File Type: zip spiegel_ger.zip (1.3 KB, 266 views)
kiklop74 is offline  
Old 04-28-2009, 01:11 PM   #497
rc006
Junior Member
rc006 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2009
Device: prs-505
hello,

It seems there a unicode problem when running feeds2disk on MacOs.
With python 2.3 or 2.6, i have :
Quote:
Traceback (most recent call last):
File "/Applications/calibre.app/Contents/Resources/loaders/feeds2disk.py", line 9, in <module>
main()
File "/Applications/calibre.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/web/feeds/main.py", line 164, in main
File "/Applications/calibre.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/web/feeds/main.py", line 152, in run_recipe
File "calibre/web/feeds/news.pyo", line 567, in download
File "calibre/web/feeds/news.pyo", line 689, in build_index
File "calibre/utils/terminfo.pyo", line 191, in update
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 88: ordinal not in range(128)
and python 3.0 do not work anymore :
Quote:
File "/usr/bin/feeds2disk", line 24
os.chmod(loader_path, 0700)
^
SyntaxError: invalid token
So i am obliged tu run windows emulator...

Otherwise, i am working on a recipe for the site http://www.lefigaro.fr/rss/
and i have a question.

The links provided in the rss in the different categories are like:
http://site.article.php so i used the followings code with success
Quote:
def print_version(self, url):
return url.replace('.php', '.php?mode=imprimer')
But i have a problem with the headline category "Actualites" which contain fresh news.
the links are : http://site.AZEEarticle.htm with a redirection to the real link
http://site.article.php
So, feeds2disk grab the second link, but the "return url.replace('.php', '.php?mode=imprimer')" does not work because it is applied on the first htm link

Any idea to apply a replacement on the second url?

Thanks
rc006 is offline  
Advert
Old 04-28-2009, 03:04 PM   #498
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,382
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The unicode error will hopefully be fixed in the next release (i cant replicate it). calibre does not support python 3.0. As for your redirect problem, the simplest solution is to use self.rower in the print_version method to visit the wensite. it will be redirected and you can get the new URL from that.
kovidgoyal is online now  
Old 04-28-2009, 04:37 PM   #499
thegillons
Junior Member
thegillons began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2009
Device: Sony PRS-505
US News & World Report

Has anyone worked up a recipe for US News yet? If so, would certainly appreciate it. --John
thegillons is offline  
Old 04-29-2009, 03:05 AM   #500
AngeloT
Junior Member
AngeloT began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2009
Device: PRS 505
Quote:
Originally Posted by kiklop74 View Post
This is improved and updated recipe for spiegel online in german.
Hey... you are great! Thank you very much... now it works!!!
AngeloT is offline  
Advert
Old 04-29-2009, 08:30 AM   #501
rc006
Junior Member
rc006 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2009
Device: prs-505
ok thanks,
I have not found how to use "self.rower" in print_version, so i grep the the real link from "send link to" url
Quote:
def get_article_url(self, article):
if 'link' in article:
url = article.get('link', None)

if 'guid' in article:
texte = article.get('description', None)
texte = texte[texte.find('link=')+5:]
url = texte[0:texte.find('"')]
return url
I have "solved" the problem for "Le figaro", but for the web site "Les Echos" i think i really need to use the function you mentioned because the "printed version" is called from the html page with a link "http://lesechos.fr/imprimer.php"
rc006 is offline  
Old 04-30-2009, 08:14 PM   #502
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by thegillons View Post
Has anyone worked up a recipe for US News yet? If so, would certainly appreciate it. --John
New recipe for US News:
Attached Files
File Type: zip usnews.zip (1.2 KB, 249 views)
kiklop74 is offline  
Old 05-01-2009, 10:17 AM   #503
Sydney's Mom
Wizard
Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.
 
Sydney's Mom's Avatar
 
Posts: 2,899
Karma: 6995721
Join Date: Dec 2008
Location: Idaho, on the side of a mountain
Device: Kindle Oasis, Fire 3d Gen and 5th Gen and Samsung Tab S
Anyone else having problems with Chicago Tribune? It just stopped working for me.
Sydney's Mom is offline  
Old 05-01-2009, 10:58 AM   #504
thegillons
Junior Member
thegillons began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Apr 2009
Device: Sony PRS-505
kiklop74, you are a friend to all of us. Thanks. I hope to learn how to make good recipes so I too can contribute to the community. Thanks again.
thegillons is offline  
Old 05-01-2009, 01:21 PM   #505
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,382
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Sydney's Mom View Post
Anyone else having problems with Chicago Tribune? It just stopped working for me.
When you say it stopped working, what do you mean?

EDIT: nevermind found the bug (it was in conversion to MOBI will be fixed in next release)

Last edited by kovidgoyal; 05-01-2009 at 03:38 PM.
kovidgoyal is online now  
Old 05-01-2009, 03:31 PM   #506
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
I can report that it works fine on my machine. You probably have internet connection issues or somehow calibre got corrupted.
kiklop74 is offline  
Old 05-01-2009, 10:19 PM   #507
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
New recipe for Twitch films:
Attached Files
File Type: zip twitchfilms.zip (889 Bytes, 235 views)
kiklop74 is offline  
Old 05-02-2009, 04:04 AM   #508
dforsyth
Junior Member
dforsyth began at the beginning.
 
Posts: 1
Karma: 10
Join Date: May 2009
Device: P505
The IHT seems to have become the New York Times Global Edition and I would appreciate it if someone can set up a recipe for this revised link.
Many thanks.
dforsyth is offline  
Old 05-02-2009, 11:27 AM   #509
Sydney's Mom
Wizard
Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.Sydney's Mom ought to be getting tired of karma fortunes by now.
 
Sydney's Mom's Avatar
 
Posts: 2,899
Karma: 6995721
Join Date: Dec 2008
Location: Idaho, on the side of a mountain
Device: Kindle Oasis, Fire 3d Gen and 5th Gen and Samsung Tab S
Quote:
Originally Posted by kovidgoyal View Post
When you say it stopped working, what do you mean?

EDIT: nevermind found the bug (it was in conversion to MOBI will be fixed in next release)
Thank you, 5.10 works! Have to keep up with Swine Flu!
Sydney's Mom is offline  
Old 05-03-2009, 09:34 PM   #510
eidolon5861
Junior Member
eidolon5861 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2009
Device: Sony PRS-505
I know this is not a news feed, but I've been trying for ages to create a recipe that will pull the HTML version of this great book (Without Hot Air - David MacKay). The key 250 pages of it are available here:

http://www.inference.phy.cam.ac.uk/w...contents.shtml

Really appreciate it.
eidolon5861 is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom column read ? pchrist7 Calibre 2 10-04-2010 02:52 AM
Archive for custom screensavers sleeplessdave Amazon Kindle 1 07-07-2010 12:33 PM
How to back up preferences and custom recipes? greenapple Calibre 3 03-29-2010 05:08 AM
Donations for Custom Recipes ddavtian Calibre 5 01-23-2010 04:54 PM
Help understanding custom recipes andersent Calibre 0 12-17-2009 02:37 PM


All times are GMT -4. The time now is 10:36 AM.


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