-2
from requests_html import HTMLSession
from bs4 import BeautifulSoup

url = 'https://kephiso.webuntis.com/WebUntis/monitor?school=Kurt-Schwitters-Schule&monitorType=subst&format=Klassen'


session = HTMLSession()


resp = session.get(url)
resp.html.render()
html = resp.html.html

page_soup = BeautifulSoup(html, 'html.parser')
print(page_soup)

I need to scrape the inside of the div style element, but the console only give me the div class out.

1 Answers1

0

Like @baduker said in his comment, you aren't selecting anything with your code. You will need to find the style tag with something like this style = page_soup.find('style').

This only works here because there is one style.

A_Patterson
  • 389
  • 1
  • 8