pycraigslist icon indicating copy to clipboard operation
pycraigslist copied to clipboard

No results from query

Open paradise-point opened this issue 2 years ago ā€¢ 8 comments

The following Python code was returning accurate results for several months. In tests with results showing up properly on craigslist, the library is returning 0 results using the same query.

city = "newyork"
result = pycraigslist.gigs.cpg(site=city, posted_today=True, search_distance=100)

It appears Craigslist has added a redirect to the search resulting in adding something like this to the URL:

#search=1~list~0~0

Might this be affecting the library? I also noticed that when modifying searchNearby to 0 in the URL, the page returns results, but this is not able to be set using this library.

paradise-point avatar Oct 06 '22 22:10 paradise-point

I am also having this problem

Agwebberley avatar Nov 23 '22 04:11 Agwebberley

Because I needed the capability, I modified my solution to use pupeteer-cluster and it's working very well. I appreciate the energy that went into this library. Thank you and it served well for some time. šŸ™šŸ¼

paradise-point avatar Nov 23 '22 05:11 paradise-point

Hello - Iā€™m sorry for the delay; for some reason I did not get this notification. I will take a look at rectifying this issue in a couple of weeks.

irahorecka avatar Nov 23 '22 07:11 irahorecka

As an update, selenium for both Chrome and Firefox does not work; Craigslist is able to pick up the decoy browsers. @paradise-point How were you able to scrape with pupeteer? I tried this method and Craigslist still notices a phony browser / JavaScript enabled session.

irahorecka avatar Dec 08 '22 07:12 irahorecka

Hello,

It definitely stopped working for me 2 day ago. I am only using the CraigslistForSale module. Is it something that can be fixed?

Thank you for your work.

usctzen avatar Feb 04 '23 12:02 usctzen

@usctzen It is nice to hear from you again! I have not looked too closely at this recently due to other priorities, but it seems that Craigslist is really cracking down on web scrapers; even a browser automation tool such as Selenium is detected. I will peek at other similar repositories to see if they made any headway.

Edit: To add to this, it seems that North American sites and areas are the primary targets of Craigslist's anti-webscraping efforts. For example, sites tokyo and berlin seem to work fine. I tried suggestions in this Stackoverflow article but to no avail.

irahorecka avatar Feb 07 '23 20:02 irahorecka

@irahorecka Thanks for the fast answer. I'll wait to see if you can fix it. I was using it for a friend and I am not sure it helped much for him. That being said, I'd love to make it work again.

Thanks for all your effort, your app is just too good to be forgotten.

usctzen avatar Feb 13 '23 09:02 usctzen

@irahorecka don't know if you know about this https://blog.3d-logic.com/2022/10/02/craigslist-automation/

usctzen avatar Feb 26 '23 07:02 usctzen