how to select a particular html tag using python -


how select <span class="wlb_wrapper"> tags http://www.imdb.com/genre/action/?ref_=gnr_mn_ac_mp? have done far , returning []:

import urllib beautifulsoup import beautifulsoup import re  url="http://www.imdb.com/genre/action/?ref_=gnr_mn_ac_mp"  page=urllib.urlopen(url).read()  soup = beautifulsoup(page)  body = soup.findall('span', {'class': 'wlb_wrapper'}) body=str(body)  o=open("output.txt","w") o.write(body) o.close() 


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -