0

On the local computer, SeleniumBase works correctly with the proxy argument passed, but on ubuntu it outputs an empty html document with the proxy argument. Below I attach the code of the simplest test that fails to parse the data.

What could be the problem?

Test with proxy:

from seleniumbase import SB with SB( uc=True, proxy="LOGIN:[email protected]:XXXX" ) as sb: sb.get("https://httpbin.io/ip") sb.sleep(2) print(sb.get_page_source()) 

Response with proxy arg:

python3 test.py <html><head></head><body></body></html> 

Test without proxy:

with SB( uc=True, ) as sb: sb.get("https://httpbin.io/ip") sb.sleep(2) print(sb.get_page_source()) 

Response without proxy arg:

python3 test.py <html><head><meta name="color-scheme" content="light dark"><meta charset="utf-8"></head><body><pre>{ "origin": "XXX.XXX.XX.XXX:XXXX" } </pre><div class="json-formatter-container"></div></body></html> 

Using CURL:

curl -x http://XXX.143.169.XX:XXXX -U LOGIN:PASS https://www.example.com <!doctype html> <html> <head> <title>Example Domain</title> </head> </html> 

When connecting via curl from this server, the proxy works fine and returns the data correctly. I tried adding xvfb, headless2, also responds with an empty document.

This code returns the same empty html:

from sbvirtualdisplay import Display from seleniumbase import Driver display = Display(visible=0, size=(1440, 1880)) display.start() driver = Driver(uc=True, proxy="USER:PASSWORD@IP:PORT") driver.uc_open_with_reconnect("https://pixelscan.net/", reconnect_time=10) # ... driver.quit() display.stop() 

    0

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.