Comments (2)
in version 123, it also have problem.
Exception ignored in: <function Chrome.del at 0x000001CA57B21E40>
Traceback (most recent call last):
File "C:\Users\sxl6107\AppData\Local\Programs\Python\Python311\Lib\site-packages\undetected_chromedriver_init_.py", line 843, in del
self.quit()
File "C:\Users\sxl6107\AppData\Local\Programs\Python\Python311\Lib\site-packages\seleniumwire\webdriver.py", line 68, in quit
super().quit()
File "C:\Users\sxl6107\AppData\Local\Programs\Python\Python311\Lib\site-packages\undetected_chromedriver_init_.py", line 798, in quit
time.sleep(0.1)
OSError: [WinError 6]
from undetected-chromedriver.
The issue with version 124 has been found.
The cause of the problem is quit() does not destroy all chrome processes.
It will leave two chrome processes unclosed.
So I simply used psutil to forcibly shut down these two processes.
Here is the code:
import psutil
def find_chrome_processes():
chrome_processes = []
for proc in psutil.process_iter(['name', 'pid', 'cmdline']):
if proc.info['name'] == 'chrome.exe' or proc.info['name'] == 'Google Chrome':
chrome_processes.append(proc)
return chrome_processes
chrome_processes = find_chrome_processes()
for proc in chrome_processes:
if "--user-data-dir=C:\\Users" in ' '.join(proc.info['cmdline']):
print(f"进程ID: {proc.info['pid']} killed")
proc.kill()
from undetected-chromedriver.
Related Issues (20)
- nodriver infinite wait on page load HOT 2
- nodriver detect browser closed
- backgroup chromedriver not quit HOT 1
- Nodriver: CDP get_response_body command not working HOT 1
- What is the different between undetected-chromedriver and nodriver HOT 2
- WebAssembly module because 'unsafe-eval' HOT 1
- Nodriver: cdp.page.add_script_to_evaluate_on_new_document NOT WORK HOT 2
- driver.quit() does not end the Chrome process fully HOT 6
- Add cookies to nodriver from httpx or requests HOT 2
- is there a way to load json cookies in nodriver? like in uc HOT 1
- AWS EC2 Linux Server Detected Despite Manipulated Headers Using Undetected Chromedriver HOT 9
- cloud fare CAPTCHA
- Cannot pass cloudflare "Verify you are human" click
- Detected on Twitch
- NoDriver: can't find element – Add to cart button HOT 1
- no driver, looking for proxies solution HOT 12
- chrome driver forces https
- [nodriver] headless=True gets detected HOT 4
- How to use execute_script on nodriver ? 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 undetected-chromedriver.