View Single Post
Old 04-05-2011, 05:13 AM   #1
Selcal
Member
Selcal began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jul 2010
Device: PRS600 / Cybook Opus
[Updated] Recipe release for De Volkskrant

--Hi all,

For some time I've been working on a recipe to download the Dutch newspaper de Volkskrant, for subscribers (password needed). I've managed to get it working now (of course, right in the middle of my work they overhauled the site :S), but I still stumble across some problems now and then.

The main problem is connection problems. These occur every now and then from home, but they occur frequently when accessing from abroad on a shabby connection, it's a Proxy error:
Code:
Python function terminated unexpectedly
  HTTP Error 502: Proxy Error (Error Code: 1)
Traceback (most recent call last):
  File "site.py", line 103, in main
  File "site.py", line 85, in run_entry_point
  File "site-packages\calibre\utils\ipc\worker.py", line 110, in main
  File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
  File "site-packages\calibre\ebooks\conversion\plumber.py", line 904, in run
  File "site-packages\calibre\customize\conversion.py", line 204, in __call__
  File "site-packages\calibre\web\feeds\input.py", line 105, in convert
  File "site-packages\calibre\web\feeds\news.py", line 734, in download
  File "site-packages\calibre\web\feeds\news.py", line 871, in build_index
  File "c:\users\mediac~1\appdata\local\temp\calibre_0.7.45_tmp_2sa8fy\calibre_0.7.45_pxqlpu_recipes\recipe0.py", line 55, in parse_index
    soup = self.index_to_soup(_INDEX)
  File "site-packages\calibre\web\feeds\news.py", line 495, in index_to_soup
  File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_mechanize.py", line 199, in open_novisit
  File "site-packages\mechanize-0.2.4-py2.7.egg\mechanize\_mechanize.py", line 255, in _mech_open
mechanize._response.httperror_seek_wrapper: HTTP Error 502: Proxy Error
I don't use a proxy at all, and usually simply restarting the recipe twice or three times (sometimes much more) will in the end lead to a succesful download.

Is there a way to change a Calibre setting, or something in the recipe, to make it retry during the recipe download? It seems a waste of time to simply give up after one error?

Next, I can't find a way to set the recipe tags from the recipe. Right now it defaults to "De Volkskrant, News" and I actually don't want both there (on my Sony reader it will then show up in two categories which I don't want). Can it be set from the recipe?

And finally, can I change the title for the output file from the recipe dynamically? Ie. if I download a different date (yesterdays newspaper for example), I would like the title to read "De Volkskrant" followed by the date of the newspaper... Todays date is of no value.

These problems are in order of priority . Thanks for any help!

Last edited by Selcal; 04-27-2011 at 02:18 PM.
Selcal is offline   Reply With Quote