0

I m trying to make my code use a socks proxy to browse a website with pyppeteer. I couldn't find a way to make it work, here the code:

browser = await PYP.launch()

page= await browser.newPage()
await page.goto(url)  

Is there any way to run PYP.launch with socks parameter? Like

browser = await PYP.launch({'args': ['--proxy-server=socks5://127.0.0.1:8080']})

Thanks in advance

FrancescoL
  • 89
  • 7

1 Answers1

0

try this:

args = ['--proxy-server=xx.xxxx.'] # xxx replaced by your proxy server
browser = await launch(headless = False,args = args)