TGV_Maximize
TGV_Maximize copied to clipboard
Captcha problem
Hi,
I managed to use your repo by copy-pasting the headers cookies in the request POST | https://www.sncf-connect.com/bff/api/v1/itineraries
done on my computer in your code. But after some hours, I got an error :
Error: HTTP 403 {"url":"https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMA4SU4xHL3M6IAbdB8CQ==&cid=yR-MpBRv7DNMoV424fC5MylpV5UCBYP8D~h10sDbiYeLH-XLXwoXSnwbgg6UdGe4J-NoQUUN79cntmGMZ5BD~LzwZWlIh0QmwQcZ9NuHxQUqVSPqL72gVg44q9Z9FOz&referer=http%3A%2F%2Fwww.sncf-connect.com%2Fbff%2Fapi%2Fv1%2Fitineraries&hash=746B7C2640FFCBD6D2BEC599D9FB5F&t=fe&s=36834&e=b41a4e3ebfd4c3baee6fdb408b55a0d862337d80bf3864c5713befeda1952730"}
Did you find a solution ? I thought about using a captcha solver in a selenium browser and copy-pasting the new cookies.
By the way, thank you a lot for your nice repo !
Hi, thanks you for your feedback about my repo :) The only solution I found to solve this captcha problem is to resolve it on my classic browser, recover new cookies and paste them in the .env file. But the selenium browser looks like very interesting to facilitate this. I'm working on it these days, do not hesitate to open a merge request if you want :+1:
I had another idea :
After each request on the website such as POST | https://www.sncf-connect.com/bff/api/v1/itineraries
, a request
POST | https://www.sncf-connect.com/bff/api/v1/web-refresh/reauthenticate
is sent. The last one contains reauthenticate.
Could it be a solution to avoid the captcha problem after using a first captcha? On my browser, SNCF never asked me to solve a captcha.
If I find something useable, I will open a merge request :+1:
See https://github.com/divulgacheur/TGV_Maximize/pull/3