2020-10-28

how can I open and read text the closed tag on html page with JavaScript?

I am using BeautifulSoup and requests_html

s = HTMLSession()
r = s.post(url, form_data)
r = s.get(url2)
r.html.render()
soup = BeautifulSoup(r.content, "html.parser")
soup = soup.find(class_="body-content row")
print(soup.prettify())

I only need text from class = "body-content row", how do I expand it?

<div class="body-content row">
 <div class="col-sm-12">
  <div ui-view="">
  </div>
 </div>
</div>


from Recent Questions - Stack Overflow https://ift.tt/3oyORqA
https://ift.tt/eA8V8J

No comments:

Post a Comment