Open Petr2282 opened 2 years ago
Can you explain what you mean about "non type obejcts"? Do you have some code that demonstrates the problem?
elif driver == Driver.FIREFOX:
options = webdriver.FirefoxOptions()
options.headless = headless
options.set_preference(
"general.useragent.override",
f"{generate_useragent('firefox')}"
)
options.set_preference("dom.webdriver.enabled", False)
options.binary_location = FIREFOX_PATH
options.proxy = p2({
'proxyType': ProxyType.MANUAL,
'httpProxy': proxy,
'ftpProxy' : proxy,
'sslProxy' : proxy,
'noProxy' : ''
})
print("Proxy: " + proxy)
woptions = {
'proxy': {
'http': 'http://' + proxy,
'https': 'https://' + proxy
}
}
return webdriver.Firefox(
seleniumwire_options=woptions,
executable_path=GECKODRIVER_PATH,
options=options
)
else:
raise Exception("Unknown driver type")
Can you explain what you mean about "non type obejcts"? Do you have some code that demonstrates the problem?
example of set up
@Petr2282
options.proxy = p2({
'proxyType': ProxyType.MANUAL,
'httpProxy': proxy,
'sslProxy' : proxy,
'noProxy' : ''
})
or:
options.proxy = p2({
'proxyType': ProxyType.MANUAL,
'httpProxy': proxy,
'sslProxy' : proxy,
})
firefox no longer support ftp-proxy.
@Petr2282 is this issue still affecting you?
I notice in your code above that you're trying to set the upstream proxy with:
options.proxy = p2({
'proxyType': ProxyType.MANUAL,
'httpProxy': proxy,
'ftpProxy' : proxy,
'sslProxy' : proxy,
'noProxy' : ''
})
This configuration shouldn't be used for upstream proxies - only use seleniumwire_options
.
Hi wkeeling, I am trying simply to intercept requests and all working without using proxy, but when connect to any proxy using seleniumwire_options it starts to return non type obejcts.