Posts: 15
Joined: Mar 2011
Reputation:
0
I have been messing with the fastpasstv plug-in and in looking at getting it working again and I have it down to where I pull the url for the redirect out but I am stuck there. Is there a way to get the script to follow the url, wait 15 seconds for the redirect to happen and then read the html source of the page I end up at?
If that made no sense then that si because I am new to this.
Thanks,
Posts: 15
Joined: Mar 2011
Reputation:
0
Thanks. I will try to use your function and see what can get working. If i make any progress on any other sites i will let you know and send it to you.
I also got videoweeks.es links working as well as novamov, but only those two. videoweeds file is about the same to extract.
I don't want to offer to help too much because i have written a total of about 10 lines of python code in my life and think at this point i will slow down any development effort more then i would help.
Posts: 843
Joined: Mar 2008
You really do not need to. The
http://www.fastpasstv.ms/redirect/?url= always remains the same, just grab the string after it and add it before requesting the url.
The response url is the original page of the file.
Code:
import urllib,urllib2,re,sys,os
req = urllib2.Request('http://www.fastpasstv.ms/redirect/?url=3uXn46ChlNzr7Z%2Fg4tzlzcbm25%2Fh2Nqh1dHV79blodba1aTqs6io15%2FY1Z3d2tekqpY%3D')
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14')
response = urllib2.urlopen(req)
print response.url