0
私はこのビデオのlinkの名前を掻きたい "狂気の女は払い戻しを欲しがっている人にクレイジーです"です。セレンpython3を使用してビデオのスクレーピング見出し
ウェブ上のコードは次のとおりです。
<span id="eow-title" class="watch-title" dir="ltr" title="Insane Woman Goes Crazy On Guy Who Just Wants A Refund">
Insane Woman Goes Crazy On Guy Who Just Wants A Refund
私はこの方法でやっている:
AttributeError: 'list' object has no attribute 'text'
があります:として
browser = webdriver.Firefox()
browser.get("https://www.youtube.com/watch?v=POk-uOQSJVk")
head = browser.find_elements_by_class_name('watch-title')
print(head.text)
それは促しています間違っている?
うわー.. Booommm ...達し親愛なる... 3分。 – user6575792
も機能しています。 'head = browser.find_elements_by_class_name( 'watch-title') 頭の溝の場合: print(ditch.text)' – user6575792