View Single Post
Old 02-17-2010, 12:41 AM   #1447
rylsfan
Member
rylsfan began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Feb 2010
Device: Kindle2
I am trying to work in a feed from the Kansas City Star. When I go to print version they embed a v-print in the middle.
I was hoping this code would fix it:

def print_version(self, url):
parts=url.split('/')
id = parts[4].split('.')
if not id[0].isdigit():
id = parts[5].split('.')
return url.replace(url, 'http://www.kansascity.com/sports/royals/v-print/story/' + id[0])

But instead, I just get a page of nothing :-)
rylsfan is offline