2014-01-24, 10:42
someone has a url extractor for add.ly ?
Not working even by putting a 5second delay.
Sample link : http://adf.ly/cCKXk
This is what a normal web browser sees after the wait time :
But not through code
This is what the code sees :
Not working even by putting a 5second delay.
Sample link : http://adf.ly/cCKXk
Code:
req = urllib2.Request(vidUrl)
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:12.2) Gecko/20120605 Firefox/12.2 PaleMoon/12.2')
req.add_header('Connection','keep-alive')
response = urllib2.urlopen(req)
print "waitingt 6 secs to read : "+vidUrl+str(response)
sleep(6)
body = response.read()
soup=BeautifulSoup(body)
print soup.prettify()
print "---------------------"
This is what a normal web browser sees after the wait time :
Code:
<a style="position: absolute; width: 300px; text-align: right; height: 30px; top: 10px; right: 20px; color: rgb(255, 255, 255); font-weight: bold; font-size: 16px;" id="skip_button" target="_top" href="http://vidto.me/mfk890oo8uzt.html">
<img src="http://cdn.adf.ly/static/image/skip_ad/en_tran.png" alt="Skip Ad" height="39" id="skip_ad_button">
</a>
But not through code
This is what the code sees :
Code:
<a id="skip_button" style="position:absolute; display: none; width: 300px; text-align: right; height: 30px; top: 10px; right:20px; color:#ffffff; font-weight: bold; font-size: 16px;" target="_top">
<img alt="Skip Ad" height="39" id="skip_ad_button" src="http://cdn.ay.gy/static/image/skip_ad/en_tran.png"/>