Quote:
Originally Posted by lorenzo2004
Hello all
aprofitto knowledge of the experts and ask for help
I can not build a custom recipe for downloading articles from www.luogocomune.net
These data:
RSS feed: http://www.luogocomune.net/site/backend.php
print version (an example): http://www.luogocomune.net/site/modu...p?storyid=2223
instead of
http://www.luogocomune.net/site/modu...p?storyid=2223
my recipe
class LuogoComune (BasicNewsRecipe):
title = u'LuogoComune '
oldest_article = 180
max_articles_per_feed = 100
remove_attributes = ['style', 'font', 'width', 'height']
language = 'en'
feeds = [(u'LuogoComune ', u'http: / / www.luogocomune.net/site/backend.php/')]
print_version def (self, url):
url.replace return ('article.php', 'print.php')
The main problems:
1) attempts today have produced an epub file of 49 pages: the first article begins on page 7, but only with a link, the article "true" by P. st. On page 8. 16 but as a single page and I can only read the first page, that is, 8. My sony prs650 can not scroll down (while the browser can internoa caliber and does not understand the problem ...) and when page. 8 I press "page forward" to end up directly pg. 17! - Note that my recipe, after adding "remove_attributes = ['style ', 'font', 'width', 'height'], " works horizontally but not vertically
2) some Italian characters are not recognized (eg apostrophe ') and are replaced by?
Thanks for your help!
My request has been read many times but no one answered ...
I wonder:
- too difficult question ...?
- I have done something wrong ...?
- I ignored the rules of the forum (without knowing it )...?
Any reply would be appreciated! 
|
(Quote from Google translate)
Not many read or reply in Italian. The recipe looks OK, but you will need to debug with print statements if it's failing. Check that you are getting the article and that the print_version is producing the correct url.
Code:
print_version def (self, url):
print 'url is: ', url
print_url = url.replace('article.php', 'print.php')
print 'print_url is: ', print_url
return print_url
Possibly the feed requires some additional headers. Make sure you've tested with the Calibre reader/viewer, not just your e-reader, so you know the problem is with the recipe, not the device.
The Italian characters problem is a character encoding issue. Search for "character encoding."
I hope you can read this. I'm not in a position to test/fix your recipe myself.