0
我工作的一個腳本從這個網頁 「https://www.google.com.eg/trends/hotvideos」 刮視頻節目,但proplem是標題被隱藏的HTML源代碼頁面上,但我可以看到它,如果我使用的檢查,以尋找那如何從隱藏的div和類使用python抓取文本?
這是我的代碼它運行良好(「class」:「wrap」) 但是當我用那個隱藏的類如「class」:「hotvideos-single-trend-title-container」時,它沒有給我任何東西on output
#import urllib2
from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen('https://www.google.com.eg/trends/hotvideos').read()
soup = BeautifulSoup(html)
print (soup.findAll('div',{"class":"hotvideos-single-trend-title-container"}))
#wrap