Reputation: 1
I'm working on a web automation project using Playwright in Python. My proxy provider recently switched to authenticated proxies in the format username:password@ip:port.
The usual workflow of my program is:
Take the proxy as input before running. Hook to the proxy. Load the page and start automation. However, I can't seem to get authenticated proxies working with Playwright. I have tried the following approaches without success:
Using PySocks. Various libraries and suggestions, including ChatGPT recommendations. Some suggestions like ProxyChains or Proxifier do work but aren't suitable for my use case. I need to:
My Requirements: Use authenticated proxies (username:password@ip:port) directly with Playwright. Avoid using external tools like ProxyChains or Proxifier.
Any help, workarounds, or libraries that can make this work would be greatly appreciated!
What I've tried so far:
Upvotes: 0
Views: 194
Reputation: 543
Try to use example code from this article https://datascrape.tech/blog/scriptable-and-headless-wb/
There are two code examples, Selenium and Playwrite, that both use proxies. Also, doublecheck that your proxy is working using cURL
Upvotes: 0