Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-20-2008, 12:04 PM   #1
brad382
Junior Member
brad382 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2008
Device: iPad Pro 12.9" (3rd Generation)
Proper code for fetching Print Version from WSJ and NYT?

Hello,

The calibre User's Manual offers an example on modifying the url to fetch the Print Version of some bbc articles. I would like to accomplish the same thing with WSJ and NYT Business articles.

In the case of the bbc website, the Print Version differs from the normal url with a particular prefix, as shown in the User's Manual example.

However, with the wsj and nyt sites, the Print Version requires a suffix to the normal url, here illustrated with an example from the wsj:

Normal:
http://online.wsj.com/article/SB122973431525523215.html

Print Version: http://online.wsj.com/article/SB122973431525523215.html#printMode

Can anyone help with the correct python code to direct it to append "#printmode" (in the case of wsj) to the end of each article's url?

Thank you.
brad382 is offline   Reply With Quote
Old 12-20-2008, 01:06 PM   #2
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 brad382 View Post
Normal:
http://online.wsj.com/article/SB122973431525523215.html

Print Version: http://online.wsj.com/article/SB1229...html#printMode

Can anyone help with the correct python code to direct it to append "#printmode" (in the case of wsj) to the end of each article's url?

Thank you.
Code:
    def print_version(self, url):
        return url + '#printMode'
kiklop74 is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in fetching news version 6.52 mlqpan Introduce Yourself 5 05-21-2010 01:44 PM
Print Version Neels Calibre 5 10-12-2009 03:09 PM
Pirates targeting print books, writes NYT Alexander Turcic News 0 05-12-2009 05:07 AM
Can I read the WSJ or NYT Online? markbot Sony Reader 17 07-30-2007 03:32 PM
WSJ Electronic Version More Profitable Bob Russell News 2 04-15-2005 08:57 PM


All times are GMT -4. The time now is 11:38 AM.


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