Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captcha problem #2

Open
odannis opened this issue Sep 4, 2022 · 3 comments
Open

Captcha problem #2

odannis opened this issue Sep 4, 2022 · 3 comments

Comments

@odannis
Copy link

odannis commented Sep 4, 2022

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 !

@divulgacheur
Copy link
Owner

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 👍

@odannis
Copy link
Author

odannis commented Sep 19, 2022

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 👍

@odannis
Copy link
Author

odannis commented Sep 25, 2022

See #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants