View Single Post
Old 08-20-2010, 04:17 PM   #2470
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by TonytheBookworm View Post
What would prevent get_printversion from finding a url in a rss feed and simply modifying it? I thought maybe def get_obfuscated_article(self, url): might be what I need to use. Cause when I look at the rss the links to the printversion simply need ?printArticle=y appended I just can't figure out for the life of me how to get this thing to feed in the links on the rss and simply modify it...
What I gave you works - I told you I tested it.
Quote:
When i try this:
Spoiler:

def print_version(self, url):
return url.partition('?')[0] +'?printArticle=y'

I still get the non-print version as if the dang thing isn't modifying the link(s).
Do you notice that what I gave you has an indent, and what you've posted does not? I assumed that's because you didn't use the CODE tags, but if you really didn't use indents, that's your problem. It does work - I've tested it twice. If you want to see it for yourself, add a print statement before the return as in:
Code:
def print_version(self, url):
    print_url = url.partition('?')[0] +'?printArticle=y'
    print 'print_url is: ', print_url
    return print_url
Starson17 is offline