11-24-2010, 09:01 PM | #1 |
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! |
11-25-2010, 01:50 AM | #2 |
Connoisseur
Posts: 76
Karma: 12
Join Date: Nov 2010
Device: Android, PB Pro 602
|
Code:
def print_version(self, url): return url.replace('/item/', '/print/') |
Advert | |
|
11-25-2010, 09:30 AM | #3 |
Nameless Being
|
Thanks! I had tried something similar to that, but must have had the code a bit off. It worked perfectly!
|
|
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 |