Comments (7)
You have to set multi_proxy=True
:
This feature has existed since April 2023 - #1832
Duplicate of #2101 (comment)
from seleniumbase.
Set a longer reconnect_time
for sb.driver.uc_open_with_reconnect(url, reconnect_time)
.
Has to be at least as long as the time it takes for the page to finish loading. Eg. examples/raw_pixelscan.py
from seleniumbase.
I appreciate your help
from seleniumbase.
I also noticed that the driver uses one single proxy for all instances even though each driver is configured to use a different proxy
from seleniumbase.
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.
from seleniumbase.
I noticed when launching multiple instances asynchronously, a conflict occurs in how proxy_ext_dir_n
folders are created.
I keep receiving for example proxy_ext_dir_2 already exists because all instances are attempting to create extension folders at the same time. Is there a way that I can custom rename those folder in SB so such conflict does not happen?
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']
from seleniumbase.
Multithreaded UC Mode: #2006 (comment)
from seleniumbase.
Related Issues (20)
- Unable to pass cloudflare using UC Mode HOT 2
- Integrate Type Checks, to improve development experience. HOT 1
- Maintainer away for 3 days. Hold your questions until April 10. HOT 2
- Comparison between playwright and seleniumbase? HOT 4
- Is it possible to add selenum webdriver remote with seleniumbase. HOT 1
- How to add saved cookies to a new browser HOT 2
- Browser asks for SSL authentication in Selenium Grid. HOT 3
- When the previous step page is not yet fully loaded, the self. open() of the next step has already been run directly HOT 2
- I hope this script can use the previous browser HOT 11
- Unable to record keystrokes
- Can't pass bot detection on dexscreener.com on Linux HOT 7
- Add UC Mode `driver` methods directly into the `SB` API HOT 1
- Some elements cannot be inputted using the input method HOT 1
- Session Time Out while trying to spawn broswer in Docker HOT 1
- Timezone problem on pixelscan test HOT 2
- Failing Docker tests when running on M2 mac HOT 4
- Docker overhaul needed HOT 2
- Encountered InvalidSessionIdException occasionally in local docker run HOT 6
- Freezes on ChromeOS when loading Driver HOT 2
- How to open a file *.html? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seleniumbase.