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

Status code always 200 // Response headers always empty #1162

Open
ppfeister opened this issue Apr 19, 2024 · 4 comments
Open

Status code always 200 // Response headers always empty #1162

ppfeister opened this issue Apr 19, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ppfeister
Copy link

ppfeister commented Apr 19, 2024

Environment

- FlareSolverr version:3.3.17
- Last working FlareSolverr version:Unk
- Operating system:All

Description

Status codes are not directly supported by Selenium and therefore FlareSolverr always returns 200.
Response headers are not directly supported by Selenium and therefore FlareSolverr always returns empty headers.

From flaresolverr_service.py:

challenge_res.status = 200  # todo: fix, selenium not provides this info
challenge_res.headers = {}  # todo: fix, selenium not provides this info

I don't believe this is documented anywhere outside of the code, so new users may encounter issues while debugging. This should serve as an easily searchable Issue to save their sanity and hours of debugging until this is resolved.

@ppfeister
Copy link
Author

Hopefully I can figure out a workaround with cdp and the webdriver logs before I lose my own sanity

@ilike2burnthing ilike2burnthing added enhancement New feature or request help wanted Extra attention is needed labels Apr 19, 2024
@asulwer
Copy link

asulwer commented May 13, 2024

This is an issue with Selenium. this issue has been discussed and they are not including support for this.

Selenium Devs say no

@ppfeister
Copy link
Author

Hey @asulwer !

We're aware that it's a selenium issue

My personal goal was (& is when free) to shoehorn support into flaresolverr by interacting with the browser behind selenium directly, rather than interacting with selenium (since they don't want to support it, as linked)

While Selenium doesn't support those items directly, the devtools for whichever browser are still somewhat exposed, giving us a theoretical side channel, even if it's not pretty

It's a low priority right now but something I'd like to poke at eventually

@asulwer
Copy link

asulwer commented May 14, 2024

another post states that it isn't possible with chromedriver but with firefox it is? i 'briefly' made an attempt at this with no success.

https://stackoverflow.com/questions/6509628/how-to-get-http-response-code-using-selenium-webdriver
https://stackoverflow.com/questions/5799228/how-to-get-status-code-by-using-selenium-py-python-code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants