-
Notifications
You must be signed in to change notification settings - Fork 196
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
AttributeError: 'Launcher' object has no attribute 'proc' #59
Comments
Men update of my forked or see my pull request. Salu2s |
Is anything happening about this? |
I've tried your fork, but the error is still the same. Full traceback: C:\Python37\lib\site-packages\nonocaptcha\base.py:20: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Look at this video: https://www.youtube.com/watch?v=zgwetyKmg5g |
it really isn't that hard to fix if you take a quick look at the code. also on windows you need to use ProactorEventLoop otherwise subprocess will throw NotImplementedError diff --git a/examples/basic.py b/examples/basic.py
index 1d4609a..354a46d 100644
--- a/examples/basic.py
+++ b/examples/basic.py
@@ -10,7 +10,7 @@ else:
sys.exit(0)
-loop = asyncio.get_event_loop()
+loop = asyncio.ProactorEventLoop()
options = {
"headless": False,
"ignoreHTTPSErrors": True,
diff --git a/nonocaptcha/launcher.py b/nonocaptcha/launcher.py
index 2c3030c..844f404 100644
--- a/nonocaptcha/launcher.py
+++ b/nonocaptcha/launcher.py
@@ -29,7 +29,7 @@ class Launcher(launcher.Launcher):
self.port = get_free_port()
self.url = f'http://127.0.0.1:{self.port}'
self.chrome_args = [f'--remote-debugging-port={self.port}']
- self._loop = self.options.get('loop', asyncio.get_event_loop())
+ self._loop = self.options.get('loop', asyncio.ProactorEventLoop())
logLevel = self.options.get('logLevel')
if logLevel:
@@ -94,6 +94,8 @@ class Launcher(launcher.Launcher):
return data['webSocketDebuggerUrl']
async def waitForChromeToClose(self):
+ if "proc" not in self.__dict__:
+ return
if self.proc.returncode is None and not self.chromeClosed:
self.chromeClosed = True
try: |
full patch to make it work on windows: https://gist.github.com/314236b2ce5e7f5a96e846fe086e2dd6 |
also, to evade the new detections you can adapt these bypass methods and it'll work: https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth/evasions |
working fork here, enjoy https://github.com/Francesco149/nonoCAPTCHA |
Captcha image recognition working fork here https://github.com/MacKey-255/GoodByeCatpcha |
I've set headless to true as well.
The text was updated successfully, but these errors were encountered: