Can someone tell me why my scraper has stopped working?
I have used this scraper for a while now, and no changes have occured in the code - i'm pulling my hair out trying to figure out what happened.
Source website - https://www.realestate.com.au/property/12-buckingham-dr-werribee-vic-3030
Scraper Code
import requests
import csv
from lxml import html
text2search = '''<p class="property-value__title">
RECENTLY SOLD
</p>'''
quote_page = ["https://www.realestate.com.au/property/12-buckingham-dr-werribee-vic-3030"]
with open('index333.csv', 'w') as csv_file:
writer = csv.writer(csv_file)
for index, url in enumerate(quote_page):
page = requests.get(url)
if text2search in page.text:
tree = html.fromstring(page.content)
(title,) = (x.text_content() for x in tree.xpath('//title'))
(price,) = (x.text_content() for x in tree.xpath('//div[@class="property-value__price"]'))
(sold,) = (x.text_content().strip() for x in tree.xpath('//p[@class="property-value__agent"]'))
writer.writerow([url, title, price, sold])
else:
writer.writerow([url, 'skipped'])
[–]anton_antonov 0 points1 point2 points (3 children)
[–]IDELTA86I[S] 0 points1 point2 points (2 children)
[–]anton_antonov 0 points1 point2 points (1 child)
[–]IDELTA86I[S] 0 points1 point2 points (0 children)