最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - How to use oxylabs proxy in seleniumbase? - Stack Overflow

programmeradmin2浏览0评论

Currently I built a script using seleniumbase. It works well, but due to the website policy, I had to use proxy. I purchased a premium proxy from oxylabs.io and generated this kind of endpoint:

customer-{username}:{password}@pr.oxylabs.io:7777

And use it in my project, but not working. So I tested with this script, but still can't access:

from seleniumbase import SB

with SB(test=True, uc=True, proxy="customer-{username}:{password}@pr.oxylabs.io:7777") as sb:
    sb.open("/")
    sb.sleep(5)

This opens the browser but with an ERR_TUNNEL_CONNECTION_FAILED error: screenshot of the error in the browser

Please let me know what's wrong in my proxy configuration.

Currently I built a script using seleniumbase. It works well, but due to the website policy, I had to use proxy. I purchased a premium proxy from oxylabs.io and generated this kind of endpoint:

customer-{username}:{password}@pr.oxylabs.io:7777

And use it in my project, but not working. So I tested with this script, but still can't access:

from seleniumbase import SB

with SB(test=True, uc=True, proxy="customer-{username}:{password}@pr.oxylabs.io:7777") as sb:
    sb.open("https://www.whatismyip/")
    sb.sleep(5)

This opens the browser but with an ERR_TUNNEL_CONNECTION_FAILED error: screenshot of the error in the browser

Please let me know what's wrong in my proxy configuration.

Share Improve this question asked Mar 18 at 7:37 Hugo RodHugo Rod 131 silver badge4 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

Change your proxy format as

http://user:password@ip:port or username:password@ip:port

Or test if your proxy works well using this tool

https://hide.mn/en/proxy-checker/

IP checking websites like https://www.whatismyip are blocked by oxylabs default.

Use https://ip.oxylabs.io instead.

发布评论

评论列表(0)

  1. 暂无评论