0

I am trying to get the cat{} values, but no luck at all.

enter image description here

https://www.funda.nl/en/koop/verkocht/leiden/huis-41395638-oude-vest-153/

Can you help me, please? And how can I split each cat{}, and create a new dataframe?

part of my code: script = item.find_element_by_xpath("//script[@type='application/ld+json']").text

Thank you

  • For simply grabbing the values, have you tried `item.find_element_by_xpath("//script[@type='application/ld+json']").get_attribute('innerHTML')` – C. Peck May 25 '21 at 09:47
  • What are you meaning by "split each cat{}" -- what are you trying to accomplish here? – C. Peck May 25 '21 at 09:54
  • I tried that code, but it's taking one script before the one I want. This is the session: – Fabio Schneider May 25 '21 at 18:42
  • the result is like this: {"cat42":"1","taal":"en","loggedin":"true","cat1":"zuidholland","cat2":"leiden","cat3":"2312xw" ---- I'd like to create a dataframe using each dictionary as per the line. – Fabio Schneider May 25 '21 at 18:46

0 Answers0