![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 1196776
Join Date: Nov 2008
Location: Bulgaria
Device: Kindle 4 NT, Onyx Boox M92
|
I can't get print version, though it should be easy
This is the full article:
http://www.investor.bg/news/article/112881/332.html And this is the print version: http://www.investor.bg/news/printer/112881/332.html From the recipe guide it looks like I should copy the BBC example for the print version and I add to the recipe the following: Code:
def print_version(self, url): return url.replace('http://www.investor.bg/news/article/', 'http://www.investor.bg/news/printer/') Can anyone give an advice? |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
http://rss.investor.bg/c/33288/f/564906/index.rss That feed does not give a url in the form of http://www.investor.bg/news/article/112881/332.html like you are expecting. It looks like this: http://rss.investor.bg/c/33288/f/564...ml/story01.htm In the future, you might want to post the full recipe. I had to guess about where your feed was, so if I guessed wrong, try this: Code:
def print_version(self, url): newurl = url.replace('http://www.investor.bg/news/article/', 'http://www.investor.bg/news/printer/') print 'The original url is: ', url print 'The new url is: ', newurl return newurl |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 294
Karma: 1196776
Join Date: Nov 2008
Location: Bulgaria
Device: Kindle 4 NT, Onyx Boox M92
|
Hello Starson17,
it looks like the url in the feed is really different from the one after the article is opened. While probably it is possible to convert the feed url to the print url, as the article identifying elements are present in both, e.g. here: Code:
http://rss.investor.bg/c/33288/f/564906/s/12e54176/l/0L0Sinvestor0Bbg0Cnews0Carticle0C1129450C3370Bhtml/story01.htm http://www.investor.bg/news/printer/112945/337.html Anyway, thanks for the help! Last edited by slex; 02-22-2011 at 05:16 PM. |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I don't use the print version option much, either. Often it's missing larger photos or something else, and I find it just as easy to extract the article content from the full article page. Whatever works - there's lots of options.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is it possible to pull the print version | mufc | Recipes | 6 | 01-31-2011 01:59 PM |
Updated Christian Bible Launches eBook Version Before Print Version | tubemonkey | News | 21 | 12-30-2010 03:53 PM |
Need Help Splitting a Print URL ... easy stuff. HELP! | mjcassel | Recipes | 2 | 11-25-2010 09:30 AM |
If i have a print version... | dhume01 | General Discussions | 3 | 10-06-2010 08:38 PM |
Print Version | Neels | Calibre | 5 | 10-12-2009 03:09 PM |