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 

    1 answer 1

    At this address on the page and there is not a single element with the class panel-open.

    In general, it seems that much of the content on the page is constructed by scripts at some point after it has been loaded. Not sure if pure BeautifulSoup can handle it. Perhaps you should look towards Selenium.

    • It's like a drop-down list there, something like clicking a tab, and a panel appears that needs to be parsed, but I have no idea how. - Pasha Vasilyev