Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New to this! #8

Open
ktraiiin opened this issue Aug 30, 2023 · 3 comments
Open

New to this! #8

ktraiiin opened this issue Aug 30, 2023 · 3 comments

Comments

@ktraiiin
Copy link

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
Copy link
Owner

harry-s-grewal commented Sep 8, 2023

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
Copy link

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

@harry-s-grewal
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants