0
이전 웹 페이지에서 텍스트를 추출하려고하는데 문제가 있습니다. 웹 페이지 (http://www.presidency.ucsb.edu/ws/index.php?pid=119039)의 소스를 검사 텍스트가 시작 : 내가 사용하여 텍스트 추출 시도BeautifulSoup을 사용하여 텍스트 추출하기
> </div></div><span class="displaytext"><b>PARTICIPANTS:</b><br>Former Secretary of State
> Hillary Clinton (D) and<br>Businessman Donald Trump
> (R)<p><b>MODERATOR:</b><br>Chris Wallace (Fox News)<p><b>WALLACE:</b>
> Good evening from the Thomas and Mack Center at the University of
> Nevada, Las Vegas. I'm Chris Wallace of Fox News, and I welcome you to
> the third and final of the 2016 presidential debates between Secretary
> of State Hillary Clinton and Donald J. Trump.<p>
:
link = "http://www.presidency.ucsb.edu/ws/index.php?pid=119039"
debate_response = requests.get(link)
debate_soup = BeautifulSoup(debate_response.content, 'html.parser')
debate_text = debate_soup.find_all('div',{'span class':"displaytext"})
print(debate_text)
을하지만 그냥 빈 목록을 반환합니다. 어떻게 내가 그 텍스트를 추출 할 수 있는지 어떤 생각?
정확히 내가 필요한 것. 고맙습니다 –