Advertisement
Guest User

Untitled

a guest
May 11th, 2019
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. >>> print(soup.select('a.hotgame > p.game')).find(class_="game")
  2. [<p class="game">神魔之塔</p>, <p class="game">Pokemon GO</p>, <p class="game">Garena 傳說對決</p>, <p class="game">Garena 極速領域</p>, <p class="game">Fate/Grand Order</p>, <p class="game">怪物彈珠</p>, <p class="game">荒野亂鬥</p>, <p class="game">超異域公主連結☆Re:Dive</p>, <p class="game">爐石戰記</p>, <p class="game">部落衝突:皇室戰爭</p>]
  3. Traceback (most recent call last):
  4. File "<pyshell#8>", line 1, in <module>
  5. print(soup.select('a.hotgame > p.game')).find(class_="game")
  6. AttributeError: 'NoneType' object has no attribute 'find'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement