Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-24-2010, 09:01 PM   #1
mjcassel
Nameless Being
 
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!
  Reply With Quote
Old 11-25-2010, 01: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
Advert
Old 11-25-2010, 09:30 AM   #3
mjcassel
Nameless Being
 
Thanks! I had tried something similar to that, but must have had the code a bit off. It worked perfectly!
  Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:53 AM.


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