harry-s-grewal / mls-real-estate-scraper-for-realtor.ca

Python MLS and Real-Estate Data Scraper for the Realtor.ca Website
MIT License
50 stars 17 forks source link

New to this! #8

Open ktraiiin opened 10 months ago

ktraiiin commented 10 months ago

Hey there,

I'm new to scrapping and would like to learn how to run both the queries.py and realtorca.py.

I've run the queries.py first then realtorca.py, but a HTTPError came up... any pointers on how I can get this up and running to export to a csv file?

get_property_list_by_city("Calgary, AB") Traceback (most recent call last):

Cell In[3], line 1 get_property_list_by_city("Calgary, AB")

File c:\users\kelvi\onedrive\desktop\web scrapper\mls-real-estate-scraper-for-realtor.ca-main\realtorca.py:13 in get_property_list_by_city coords = get_coordinates(city) # Creates bounding box for city

File ~\OneDrive\Desktop\Web Scrapper\mls-real-estate-scraper-for-realtor.ca-main\queries.py:10 in get_coordinates response.raise_for_status()

File ~\anaconda3\Lib\site-packages\requests\models.py:1021 in raise_for_status raise HTTPError(http_error_msg, response=self)

HTTPError: 400 Client Error: Bad Request for url: https://nominatim.openstreetmap.org/search?q=Calgary,%20AB&format=json&country=Canada

harry-s-grewal commented 10 months ago

Hey! Thanks for pointing this out, this is an issue with the way I'm querying the endpoint. I actually saw this issue earlier, but they've changed the API endpoint which breaks my code. I'm pushing a change now, update your repo and try again.

quanghuynguyenhua commented 5 months ago

Hello Harry. Any updates or recommend to fix the code?

harry-s-grewal commented 3 months ago

@quanghuynguyenhua What's breaking? If you give me the error message, I can fix it.