2009-01-02, 12:07
Hey guys, does anybody have a working code for grabbing Yahoo Videos? I've been trying for several days but to no avail.
I tried this piece of code that does not work:
I tried this piece of code that does not work:
Code:
req = urllib2.Request(url)
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')
page = urllib2.urlopen(req);new=page.read();page.close()
try:
swap=re.compile("'http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?id=(.+?)'").findall(new)
addLink(name,swap[0],'')