Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-24-2010, 10:01 PM   #1
mjcassel
Junior Member
mjcassel began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
Need Help Splitting a Print URL ... easy stuff. HELP!

Hello,

I am trying to get the print version of this site. The two URLs only differ by one word, but I can't get the splitting to work because I am new to this. Here are the two URLs:

http://www.truthdig.com/report/print...namo_20101116/

http://www.truthdig.com/report/item/...namo_20101116/

Could someone whip up a quick "def print" recipe for me? Mine isn't working.

Thanks!
mjcassel is offline   Reply With Quote
Old 11-25-2010, 02:50 AM   #2
miwie
Connoisseur
miwie began at the beginning.
 
Posts: 76
Karma: 12
Join Date: Nov 2010
Device: Android, PB Pro 602
Code:
def print_version(self, url):
        return url.replace('/item/', '/print/')
miwie is offline   Reply With Quote
Old 11-25-2010, 10:30 AM   #3
mjcassel
Junior Member
mjcassel began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
Thanks! I had tried something similar to that, but must have had the code a bit off. It worked perfectly!
mjcassel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy URL transfer Stonecold Amazon Kindle 5 07-29-2012 03:48 AM
Splitting Library Giuseppe Chillem Calibre 0 11-02-2010 03:00 PM
Print vs Pixel: retailers experiment with print/ebook bundles DMcCunney General Discussions 42 09-15-2010 12:29 PM
Splitting an ebook in 2 Spectralist Workshop 5 06-07-2009 09:01 AM
Splitting help needed tibiafry Workshop 1 05-18-2009 09:16 AM


All times are GMT -4. The time now is 04:55 PM.


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