0
私は、このWebページ 「https://www.google.com.eg/trends/hotvideos」 からビデオタイトルを掻き取るためのスクリプトに取り組んが、proplemはタイトルがHTMLソースページに隠されているが、私はそのpythonを使ってhidden divとclassからテキストを掻く方法は?
探しにインスペクタを使用した場合、私はそれを見ることができますこれは私のコードです(class: "wrap") しかし、私はそれを "class"のような隠されたものと一緒に使った: "hotvideos-single-trend-title-container"出力時
#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