-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Chrome is stuck with same IP when using a proxy. #2617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You have to set
This feature has existed since April 2023 - #1832 Duplicate of #2101 (comment) |
Yes, I just fixed it and you replied. Also sometimes the challenge page doesn't let me through and I have to manually click verify, any fix for that. |
Set a longer |
I appreciate your help |
I noticed when launching multiple instances asynchronously, a conflict occurs in how def get_cookies(proxy, username, password):
with SB(uc=True, proxy=proxy, multi_proxy=True) as sb:
sb.driver.uc_open_with_reconnect('http://example.com/login', 5)
sb.driver.type('#username', username)
sb.driver.type('#password', password)
sb.driver.click('#login')
return sb.driver.get_cookies()
async def create_session(account, proxy, timeout):
headers = {
'User-Agent': ('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) '
'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 '
'Safari/537.36')
}
session = AsyncSession(
impersonate='chrome119',
timeout=timeout,
http_version=CurlHttpVersion.V2_0,
headers=headers,
proxies={'https': proxy}
)
loop = asyncio.get_running_loop()
cookies = await loop.run_in_executor(custom_executor, get_cookies, proxy, account['username'], account['password'])
for cookie in cookies:
session.cookies.set(cookie['name'], cookie['value'], domain=cookie['domain'])
return session, account['username'], account['issuer'], account['id'], account['variant'] |
Multithreaded UC Mode: #2006 (comment) |
It does not change even when changing proxy providers, it's just stuck with that data.
The text was updated successfully, but these errors were encountered: