Selenium Threads:如何使用代理运行多线程浏览器(python)
本文介绍了Selenium Threads:如何使用代理运行多线程浏览器(python)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写一个脚本来使用具有多个线程的代理访问网站,但现在我被困在多个线程中,当我运行下面的脚本时,它会打开 5 个浏览器,但所有 5 个都使用 1 个代理,我想要 5 个浏览器使用不同的代理,有人可以帮我完成吗?谢谢你
I'm writing a script to access a website using proxies with multiple threads but now I'm stuck in multiple threads, when I run the script below, it opens 5 browsers but all 5 use 1 proxy, I want 5 browsers to use different proxies, can someone help me complete it? thank you
这是我的脚本:
(祝大家新年快乐,万事如意)
(Wish everyone has a happy and lucky new year)
推荐答案
Dominik Lašo 正确捕获了它 - 每个线程从头开始处理文件.这可能是它的样子:
Dominik Lašo captured it correctly - each threads processes the file from the beginning. Here's probably how it should look like:
这篇关于Selenium Threads:如何使用代理运行多线程浏览器(python)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!