self.proxyauth_plugin_path = self.create_proxyauth_extension(proxy_host="117.41.186.194",proxy_port="888",proxy_username="we41a",proxy_password="we41a",scheme="https",plugin_path=None)
self.driver.add_extension(self.proxyauth_plugin_path)
self.driver = webdriver.Chrome(options=options)
def create_proxyauth_extension(proxy_host, proxy_port,
proxy_username, proxy_password,
scheme, plugin_path):
我明明6个参数为啥说我7个参数,求解,谢谢!
类内部的方法如果不声明成类方法(@classmethod),那么它的第一个参数默认指向类的实例,相当于平常用的self。第一个参数起什么名都无所谓的,python解释器会自动将第一个参数设定为实例自身,并不是你不写self,python就不传入类的实例,所以,在调用时,加上你给的6个,python解释器一共传了7个