In general, I try to get at least some tags from this site, and it always gives out none. I have no idea how to fix it, google, could not find anything. PS just started to learn it.
# coding: utf-8-sig import urllib.request from bs4 import BeautifulSoup headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"} def get_html(url): request = urllib.request.Request(url,None,headers) response = urllib.request.urlopen(request) return response.read() def parse(html): soup = BeautifulSoup(html,"html.parser") table = soup.find('body', class_='panel-open') print(table) def main(): parse(get_html('http://toto-info.co/')) if __name__ == '__main__': main()# coding: utf-8-sig