You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a problem (apparently an extension caching issue), when passing None to proxy it still tries to connect to the proxy, even after removing the extension itself and rebooting the PC, options.remove_extensions() and driver.clear_cache() doesn't help. I'm passing the port as I recall because no other browsers were opening, I'm working with multiprocessing. Maybe the problem occurs because I'm passing the port directly?
It doesn't bother me much since my browsers are all proxy-enabled, but still, author, you're awesome, without you I wouldn't know what to do with cloudflare )
If anyone has encountered the same problem, how do you solve it? I'm interested for the future
from typing import Union
from DrissionPage import ChromiumPage, ChromiumOptions
from src.browser.proxy.plugin import ProxyPluginMixin
class BrowserDriver(ProxyPluginMixin):
def __init__(
self,
proxy: Union[str, None] = None,
port: int = None
):
options = ChromiumOptions()
options.set_local_port(port)
options.remove_extensions()
if proxy:
options.add_extension(self.get_proxy_plugin_path(proxy))
options.set_argument("--start-maximized")
self.driver = ChromiumPage(addr_or_opts=options)
self.driver.clear_cache()
The text was updated successfully, but these errors were encountered:
Do you have a folder here? (its a userdata directory)
/tmp/DrissionPage
Try to delete it.
I thought the same thing about userdata, but didn't go into it. I can't tell if there is a tmp directory, if I encounter this problem in other projects, I will look in that direction, now unfortunately there is no time to solve it as it is not critical. Just with selenium I have not observed this problem and I think it should not be so.
But for example on Windows, where can a temporary file be located?
I ran into a problem (apparently an extension caching issue), when passing
None
toproxy
it still tries to connect to the proxy, even after removing the extension itself and rebooting the PC,options.remove_extensions()
anddriver.clear_cache()
doesn't help. I'm passing the port as I recall because no other browsers were opening, I'm working with multiprocessing. Maybe the problem occurs because I'm passing the port directly?It doesn't bother me much since my browsers are all proxy-enabled, but still, author, you're awesome, without you I wouldn't know what to do with cloudflare )
If anyone has encountered the same problem, how do you solve it? I'm interested for the future
The text was updated successfully, but these errors were encountered: