I am running automation with Selenium and Python on Opera web driver, when I enter the specific page that I need, a request is sent to the server, it is authenticated with anti-content which blocks me from requesting it, then the only solution is to get the returned JSON after sending the request, I had checked selenium-wire, but I think it doesn't fit my needs, I thought if there is another way to do that, any suggestions?
Asked
Active
Viewed 1,111 times
2 Answers
0
Hello there are some pages which is created to be impossible automatize the request.
That rule works in JavaScript and there are companies which makes this detection and close the access for a bot.
So I am sorry to cannot solve your problem, I tried to do the same as You and there are not way.

Vahram Danielyan
- 187
- 3
- 11
-
-
We was tried to disable with experts of JavaScript and that was impossible. Maybe you can find them but I no think that is legal. – Vahram Danielyan Mar 19 '21 at 18:40
-
I re-used chrome with selenium-wire, and managed to get and automatize the requests, but I needed Opera because of the free VPN I can use in automation. – Evara Mar 19 '21 at 18:43
-
Should be, that is interesting and I didn’t know about there are differences between explorers. So I al sorry can’t help you. – Vahram Danielyan Mar 19 '21 at 18:46
-
Yeah there is big difference, as an example, Opera, brave, Vivaldi, Edge, Epic, SlimBrowser, Torch etc. Even though they all use chromium-based browser they differ in secuirity, UI, speed etc. – Evara Mar 19 '21 at 18:50
0
You can try to use Titanium Web Proxy. It is a proxy server and can be installed via Nuget package and used with Selenium.
string body = await e.GetResponseBodyAsString();
Reference:
https://github.com/justcoding121/Titanium-Web-Proxy/issues/176
https://www.automatetheplanet.com/webdriver-capture-modify-http-traffic/#tab-con-9

K. B.
- 3,342
- 3
- 19
- 32