Open GoogleCodeExporter opened 9 years ago
P.S.
I have to modify the defautl.py for MySoJu Rev 5 alittle bit in order to
extract the video link on tudou.
try:
todouStr=re.compile('document.write\(decodeBase64\("(.+?)"\)\);').findall(link)
# print "todouStr="+todouStr[0]
todouDecode=todouStr[0].decode('base64','strict')
print "todouDecode="+todouDecode
todouLink=re.compile('<param name="movie" value="(.+?)"\/>').findall(todouDecode)
todouLink=re.compile('<object type=".+?" data="(.+?)" width=".+?" height=".+?">').findall(todouDecode)
print "todouLink[0]="+todouLink[0]
print "todouLink="+str(todouLink)
req = urllib2.Request('%s'%todouLink[0])
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
todou = urllib2.urlopen(req)
print "todou="+str(todou)
addLink(name,todou.url,info)
except: pass
Original comment by jsk...@gmail.com
on 31 Jul 2010 at 3:59
Original issue reported on code.google.com by
jsk...@gmail.com
on 31 Jul 2010 at 3:54