Simple example BeautifulSoup Python -
i working simple example beautifulsoup, getting weird resutls.
here code:
soup = beautifulsoup(page) print soup.prettify() stuff = soup.findall('td', attrs={'class' : 'prodspecatribtue'}) print stuff when print get:
[] not sure what's happening, because when printed soup on screen got proper data. searching values in found in tag <td> under class prodspecatribtue
you misspelled class name:
soup.findall('td', attrs={'class': 'prodspecatribute'}) works fine. that's prodspecatribute, not prodspecatribtue. that's still misspelled, less so.
Comments
Post a Comment