I have a web scraping code that cannot find a table. My code looks like:
site = 'http://etfdb.com/compare/market-cap/'
hdr = {'User-Agent': 'Mozilla/5.0'}
req = Request(site, headers=hdr)
page = urlopen(req)
soup = BeautifulSoup(page)
table = soup.find('table', {"class":"table mm-mobile-table table-striped
table-bordered"})
The tables HTML looks like:
<table class="table mm-mobile-table table-striped table-bordered" data-
icons-prefix="fa" data-icons="{"columns":"fa-th"}" data-
striped="true" data-toggle="table">
but for some reason my code always returns table as none. I do not know why but any help would be appreciated. Thanks.