rss-bridge: LeBonCoin failed with error 403
Error message: The requested resource cannot be found! Please make sure your input parameters are correct! cUrl error: (0) PHP error:
Query string: action=display&bridge=LeBonCoin&keywords=nintendo+sitch®ion=13&department=&cities=&category=&pricemin=&pricemax=&estate=&roomsmin=&roomsmax=&squaremin=&squaremax=&mileagemin=&mileagemax=&yearmin=&yearmax=&cubiccapacitymin=&cubiccapacitymax=&fuel=&owner=&format=Html
Version: git.master.2714c3d
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 6
- Comments: 29 (9 by maintainers)
Hello, i got a way to fix 403. Not free though, you can find my contact infos on my profile
Hey, I am trying to understand how datadome block requests.
For now, I have the following. When browsing leboncoin using a browser several requests are made, among them, I’ve looked closer to requests made to :
The request to dd.leboncoin.fr looks like this :
So it looks like that this request sends to datadome informations about how the user interact with the website (its mouse movements, etc). The data response to that request is :
We see that datadome gave us a cookie. I wonder if it uses that cookie to follow us on the website and to keep track of real users and block the others.
If I remove the payload (jsData & co), the reponse is status 400, without cookie.
The other request is the one that queries the API :
There you have the research filters as payload. From here, I’m not sure of what’s happening. I’m not sure how the API decide if I’m blocked or not, and I can’t really experiment because the request always works for now. My guess is that, maybe setting the Cookie : datadome=blabla help to not being blocked. Or maybe, you have to send good enough user interaction through the request to dd.leboncoin.fr to make your IP "valid’ for a certain amount of time.
As datadome seems to be based on IA, the behavior may evolve and there are potentially multiple way to bypass it.
If someone wants to give it a try, I’ve made a little script in python to try these requests : https://github.com/Skealz/reqlbc/blob/main/req_lbc.py It would be great if blocked people try it and tell if it works
I changed the endpoint in my PHP project to point to
https://api.leboncoin.fr/finder/searchinstead ofhttps://api.leboncoin.fr/api/adfinder/v1/search. I still get 403.I checked the data given by these 403 responses, they contain :
{"url":"https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMAfeednTqgQfoAWKt4JA==&cid=Zm8ddoCRZ_odYhn8CsQpzejqgYQAgtoZJtN4rMvsBVABBuJmiXJG~hrqH~BZiiV1kQ1ZIpB7fUwia6fSwREUG3KY0677oKtMTV~nmd-MOfwHEKhbc~U9HWMbXUUIzW5&referer=https%3A%2F%2Fapi.leboncoin.fr%2Ffinder%2Fsearch&hash=05B30BD9055986BD2EE8F5A199D973&t=fe&s=7501"}Meaning that this is bot blocking mechanism.This is surprising to me because from the same IP, I am able to issue request (from python) to the same API endpoint, without being blocked. Maybe datadome is able to identify something very specific about the request (timing, formatting… i don’t know) to block it.
I will try to integrate into the PHP code, a request to
dd.leboncoin.frbefore the request to the API, to see if something happens.@pointpaul vade retro to https://www.growthhacking.fr/ … The idea of this repo is to SHARE the code, not sell…
403 mainly come from LBC bot protection. My serveur’s IP has been blocked and I take 403 since months. When I change the UserAgent I have 2-3 requests in 200 before come back to 403.
Thanks @timat35 it works for now, I hope it will last for long, this LeBonCoin bridge is awesome when it works 😃
Hi,
403 since 2 days despite it worked great before
Thanks