juliomalegria / python-craigslist

Simple Craigslist wrapper
MIT No Attribution
387 stars 165 forks source link

403 error #74

Closed BigFav closed 4 years ago

BigFav commented 4 years ago

When following the basic lines in the README, I get requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://sfbay.craigslist.org/search/sfc/roo?searchNearby=1&sort=date&max_price=1200&private_room=1&s=0.

Is there functionality that allows a user to work-around this? A quick look at the code makes it seem like no.

A potential lede - https://stackoverflow.com/questions/16627227/http-error-403-in-python-3-web-scraping

BigFav commented 4 years ago

Closing this as I now see that this is an issue with my setup.

juliomalegria commented 4 years ago

Hey @BigFav, What was the issue with your setup? And how did you fix this? Just for me to know in case other user in the future has the same issue.

BigFav commented 4 years ago

I was using an old version of WSL (Bash Ubuntu on Windows). Simply upgrading to the current version (18.04 LTS) resolved the problem for me. All of my requests calls were failing with a 403, not just the ones from this package.

juliomalegria commented 4 years ago

I see. Awesome, thanks for sharing!