tdurieux / leboncoin-api

DEPRECATED
https://www.npmjs.com/package/leboncoin-api
169 stars 54 forks source link

API down ? #55

Closed gchapelle closed 4 years ago

gchapelle commented 5 years ago

Hi, Does the API still work for you? I did a small script from python using https://api.leboncoin.fr/finder/search/' which does not seem to work anymore ? Thanks

Best

Guillaume

xnico31 commented 5 years ago

i have a issue to

api.leboncoin.fr/finder/search

when you send the api request he return this.

{"url":"https://c.datado.me/captcha/?initialCid=AHrlqAAAAAMAnpLzB0wHSA4ABTP5qA==&hash=05B30BD9055986BD2EE8F5A199D973&t=fe"}

But this url work but only for specific ID not a search https://api.leboncoin.fr/finder/classified/"+id

if you find a way to do search again ;)

best

alexismoreau commented 5 years ago

Correction: I have this message as well.

nbusseneau commented 5 years ago

@xnico31 See #53 for details relevant to your issue. @gchapelle Can you check if its the same issue in your case, or something else, by looking at response value?

alexismoreau commented 5 years ago

@Skymirrh Using your PR doesn't fix on my production setup, but works locally

nbusseneau commented 5 years ago

@alexismoreau Welp, too bad. I suggest we stick to #53 for discussing potential fixes so as to keep it in one place.

xnico31 commented 5 years ago

I tried to change ip, serveur proxy same issue i don't think i'm ban

tdurieux commented 5 years ago

I look at the https://www.leboncoin.fr again and it seems they made some changes to the website to increase the security. I, unfortunately, don't have a lot of time to investigate on this :/

@xnico31 you should look at the header of your requests and how frequently you do it.

Maybe it is your server provider that has been blocked.

ronycohen commented 5 years ago

Same error here...

Get result : { "url": "https://c.datado.me/captcha/?initialCid=*****************==&hash=****************&t=fe" }

Header on chrome is :

api_key: ba0c2dad52b3ec Content-Type: application/json Referer: https://www.leboncoin.fr/recherche/?** Sec-Fetch-Mode: cors User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36

I think it's about a cookie of c.datado.me but not sure....

tdurieux commented 5 years ago

I see that you are missing several headers:

ronycohen commented 5 years ago

Thank you @tdurieux,

I tried on Postman with same error, I look at the #53 issue.

image

tdurieux commented 5 years ago

You cannot use * value, you can look at the one used in this repo: https://github.com/tdurieux/leboncoin-api/commit/456d955747cec2f6005f7872e9bdaec7fc194339#diff-50e3aa130a4f97a42ee2cf111c7b1d9dR5

ronycohen commented 5 years ago

thanks @tdurieux ,

I red about the Cookie to add.

I tried that, with success ! THANKS !!

image

regarde commented 4 years ago

Hi everyone, it look likes Leboncoin adjusted their Datadome settings, the current headers does not work anymore on my end. Any luck on yours?

stanicboris commented 4 years ago

Yep, I don't know if my IP is the problem but none of the solutions I've found are working anymore.

tdurieux commented 4 years ago

I don't have issues with the library (at least by doing only few requests ) but I am currently in the US, this may impact the results.

regarde commented 4 years ago

You're right, the library is working fine. I made further tests and it's an IP address issue. I was using Luminati and the proxy got detected/banned by Datadome.

Aambro commented 4 years ago

I am doing searches every 20 minutes apart from 00-06 hours and after getting results for few searches it then stops returning results. I get results again after few hours for few times and then stops again.

I would love to get them more often and I believe I'm missing something. Likely I don't know how to set cookie correctly or something else?

Could anyone give me a hint of what I'm missing and in case I need to put in some data from chrome, what data would that be? Screenshot_20191218-185605_JuiceSSH