Quote:
Originally Posted by Starson17
Here's a simple way to do it:
Code:
def print_version(self, url):
parts = url.rsplit('?')
print_url = parts[0] + '?Print=Yes'
return print_url
It splits at the '?' and adds your '?Print=Yes' to the first half.
|
Hi,
thanks for that but unfortunately it didn't work, not sure whats going on, I've tried copying some of the links into firefox and changing the ends to
in case it was different for some links and they all accept the print code.
This is pretty odd, A single url.replace will work for any of them, add another and they both stop.
Doesn't matter if they are stacked or two separate lines of code as soon as you add the second it cancels out the first.
I'm at your mercy guys, I don't have a clue now.