I am super new to coding and so far, I am just copying solutions I found online.I encountered a challenge when scraping this site.https://www.oneroof.co.nz/property/auckland/bucklands-beach/18-camwell-close/H3rQwI would like to get Oneroof estimate (class="text-xl md:hidden text-secondary font-bold").I believe this site is protected to anti web scraping. So I found Zenrows to bypass.I successfully retrieved the html but I don't know how to return the result I want.Tried to combine Zenrows with Beautifulsoup but not sure if that's a proper approach.
pip install zenrows
from zenrows import ZenRowsClient
client = ZenRowsClient("daf1d79772a751a7d680055ed81a0d5b47cb2bb6")url = "https://www.oneroof.co.nz/property/auckland/bucklands-beach/18-camwell-close/H3rQw"params = {"js_render":"true","json_response":"true","js_instructions":"%5B%7B%22click%22%3A%22.selector%22%7D%2C%7B%22wait%22%3A500%7D%2C%7B%22fill%22%3A%5B%22.input%22%2C%22value%22%5D%7D%2C%7B%22wait_for%22%3A%22.slow_selector%22%7D%5D"}
response = client.get(url, params=params)
import requestsfrom bs4 import BeautifulSoupsoup = BeautifulSoup(response.text, "html.parser")mydivs = str(soup.find(class_="text-xl md:hidden text-secondary font-bold"))print(mydivs)
Returned "None"
Thanks!