I am writing python script which gets links from website. But when I tried with this web page I was unable to get links. My script is:
soup = BeautifulSoup(urllib2.urlopen(url))
datas = soup.findAll('div', attrs={'class':'tsrImg'})
for data in datas:
link = data.find('a')
print str(link.href)
it prints only None, can anyone explain why it is so???
Change:
With:
It will look like this:
Outputs: