How to extract json <script> elements with BeautifulSoup
I need to extract different elements from a JSON part of the page, each element under @type. I tried this post but could not figure it out. data = soup.findAll('script', {'type':'application/ld+json'}) oJson = json.loads(data.text)["model"] gives an error of AttributeError: ResultSet…