Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
- Type "copyright", "credits" or "license()" for more information.
- >>> import requests
- >>> from bs4 import BeautifulSoup
- >>> bahammut_ranking_html=requests.get("https://www.gamer.com.tw/")
- >>> soup=BeautifulSoup(bahammut_ranking_html.text,"html.parser")
- >>> soup.find(class_="BA-ctag1").find(class_="BA-ctag1now").find(class_="BA-cbox BA cbox5 BA mobilegamechart").find(class_="game").find("p")
- Traceback (most recent call last):
- File "<pyshell#4>", line 1, in <module>
- soup.find(class_="BA-ctag1").find(class_="BA-ctag1now").find(class_="BA-cbox BA cbox5 BA mobilegamechart").find(class_="game").find("p")
- AttributeError: 'NoneType' object has no attribute 'find'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement