mikeyy / nonocaptcha Goto Github PK
View Code? Open in Web Editor NEWAn asynchronized Python library to automate solving ReCAPTCHA v2 using audio
License: GNU General Public License v3.0
An asynchronized Python library to automate solving ReCAPTCHA v2 using audio
License: GNU General Public License v3.0
Currently this doesn't work with backconnect proxies because utils.get_page
uses a different proxy to the one my browser is using so I cannot download the audio files (I get a 403 error).
However, this is not critical and I can still work on the image solving. Any advice on how to use the same proxy?
Looking to work on this project again, but would like a proxy to use.
Feel free to email me.
Many thanks,
Carlo
Hi,
Has someone run this project successfully? If yes, please tell me how to run this.
Thanks a lot.
If text to speech isn't a bottle neck, then disregard this.
If speech to text produces an appreciable number of errors though, I or we could look into gathering a consensus value from the available tools.
e.g. If Amazon produces a string (s1), but Microsoft and Mozilla are in agreement on a string (s2), we can toss out Amazon's string and proceed with s2
.
craps out due to working with pyppeteer
version 0.0.23
which had a typo with for chromium_excutable
(missing e
between ex
and cu
).
https://github.com/mikeyy/nonoCAPTCHA/blob/master/requirements.txt#L10
update to pypeteer
to version 0.0.25
miyakogi/pyppeteer@6106a6b
I'm trying to load an Invisible Captcha, but it always times out on wait_for_checkbox()
.
2019-02-23 12:31:38,249 0 Starting solver with proxy 127.0.0.1:8080
Traceback (most recent call last):
File "/home/user/.local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 74, in start
result = await self.solve()
File "/home/user/.local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 265, in solve
await self.loop.create_task(self.wait_for_checkbox())
File "/home/user/.local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 320, in wait_for_checkbox
timeout=self.animation_timeout)
File "/home/user/.local/lib/python3.6/site-packages/pyppeteer/frame_manager.py", line 834, in __await__
raise result
pyppeteer.errors.TimeoutError: Waiting for function failed: timeout 5000ms exceeds.
2019-02-23 12:31:50,160 0 Waiting for function failed: timeout 5000ms exceeds. <class 'pyppeteer.errors.TimeoutError'>
2019-02-23 12:31:50,172 0 Browser closed
2019-02-23 12:31:50,173 0 Time elapsed: 12.192129611968994
2019-02-23 12:31:50,460 1 Starting solver with proxy 127.0.0.1:8080
Traceback (most recent call last):
File "/home/user/.local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 74, in start
result = await self.solve()
File "/home/user/.local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 265, in solve
await self.loop.create_task(self.wait_for_checkbox())
File "/home/user/.local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 320, in wait_for_checkbox
timeout=self.animation_timeout)
File "/home/user/.local/lib/python3.6/site-packages/pyppeteer/frame_manager.py", line 834, in __await__
raise result
pyppeteer.errors.TimeoutError: Waiting for function failed: timeout 5000ms exceeds.
2019-02-23 12:32:01,685 1 Waiting for function failed: timeout 5000ms exceeds. <class 'pyppeteer.errors.TimeoutError'>
2019-02-23 12:32:01,697 1 Browser closed
2019-02-23 12:32:01,698 1 Time elapsed: 11.511975288391113
2019-02-23 12:32:01,996 2 Starting solver with proxy 127.0.0.1:8080
Traceback (most recent call last):
File "/home/user/.local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 74, in start
result = await self.solve()
File "/home/user/.local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 265, in solve
await self.loop.create_task(self.wait_for_checkbox())
File "/home/user/.local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 320, in wait_for_checkbox
timeout=self.animation_timeout)
File "/home/user/.local/lib/python3.6/site-packages/pyppeteer/frame_manager.py", line 834, in __await__
raise result
pyppeteer.errors.TimeoutError: Waiting for function failed: timeout 5000ms exceeds.
2019-02-23 12:32:13,226 2 Waiting for function failed: timeout 5000ms exceeds. <class 'pyppeteer.errors.TimeoutError'>
2019-02-23 12:32:13,238 2 Browser closed
2019-02-23 12:32:13,238 2 Time elapsed: 11.52773904800415
2019-02-23 12:32:13,517 3 Starting solver with proxy 127.0.0.1:8080
^CTraceback (most recent call last):
File "test.py", line 171, in <module>
loop.run_until_complete(r.main())
File "/usr/lib/python3.6/asyncio/base_events.py", line 460, in run_until_complete
self.run_forever()
File "/usr/lib/python3.6/asyncio/base_events.py", line 427, in run_forever
self._run_once()
File "/usr/lib/python3.6/asyncio/base_events.py", line 1404, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib/python3.6/selectors.py", line 445, in select
fd_event_list = self._epoll.poll(timeout, max_ev)
KeyboardInterrupt
import asyncio
from nonocaptcha.solver import Solver
pageurl = ''
sitekey = ''
args = ["--timeout 5"]
options = {"ignoreHTTPSErrors": True, "args": args}
client = Solver(
pageurl,
sitekey,
options=options
)
solution = asyncio.get_event_loop().run_until_complete(client.start())
if solution:
print(solution)
root@MumblePVP:~/c9launcher/workspaces/chatroom-dev/Bloxility# python3 recapBypass.py
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/nonocaptcha-1.8.8-py3.8.egg/nonocaptcha/solver.py", line 54, in start
self.browser = await self.get_new_browser()
File "/usr/local/lib/python3.8/site-packages/nonocaptcha-1.8.8-py3.8.egg/nonocaptcha/solver.py", line 143, in get_new_browser
browser = await self.launcher.launch()
File "/usr/local/lib/python3.8/site-packages/nonocaptcha-1.8.8-py3.8.egg/nonocaptcha/launcher.py", line 72, in launch
self.browserWSEndpoint = await self._get_ws_endpoint()
File "/usr/local/lib/python3.8/site-packages/nonocaptcha-1.8.8-py3.8.egg/nonocaptcha/launcher.py", line 91, in _get_ws_endpoint
await self.proc.stdout.read().decode()
AttributeError: 'NoneType' object has no attribute 'read'
2018-11-19 09:50:27,031 0 'NoneType' object has no attribute 'read' <class 'AttributeError'>
2018-11-19 09:50:27,031 0 Time elapsed: 0.23222041130065918
root@MumblePVP:~/c9launcher/workspaces/chatroom-dev/Bloxility#
Whenever running the code above I get this error. I am using python 3 ( pip 10.0.1 from /usr/local/lib/python3.8/site-packages/pip (python 3.8) )
I WOULD LIKE TO CONTACT YOU. HOW CAN I REACH YOU? PLEASE GET BACK TO ME ASAP WITH A WAY OF CONTACT
I'm getting the following error when trying to run the demo.py (and replacing pageurl
and sitekey
with my own values) file:
Solver can't run without a configuration file!
An example (nonocaptcha.example.yaml) has been copied to your folder.
I'm using Windows 7 64 bits, and when I run the script, it works, but it doesn't work after downloading the audio. I receive this error "OSError: Unable to remove Temporary User Data" and the chromium crashs, and when I try to connect to gmail account with a proxy I receive this one "Page.waitForNavigation' was never awaited".
Python Version: 3.6.5
Chromium Auto Installed by pyppeteer Version: 67.0.3372.0
Just wondering which version of chromium you are using, since I am getting bugs on the current release.
2018-08-10 14:28:21,181 0 Starting solver with proxy None
2018-08-10 14:28:21,189 0 Protocol Error: 'Page.setBypassCSP' wasn't found None <class 'pyppeteer.errors.NetworkError'>
2018-08-10 14:28:21,218 0 Browser closed
I fixed this by commenting out the Page.setBypassCSP code. However the code cannot click on the I am a robot checkbox and it only becomes grey out a bit but never fully checked and becomes stuck at:
2018-08-10 14:29:50,343 0 Starting solver with proxy None
2018-08-10 14:29:52,742 0 Clicking checkbox
What browser are you using?
I am using Chromium Version 67.0.3372.0 (Developer Build) (64-bit) for mac that was installed by default by pyppeteer
My ip is currently banned on google chrome, and google chrome canary, and chromium but not firefox. Is there any reason for this discrepancy? I have checked the userAgent and all other request headers but I cannot find any way that google would be able to know I was using chrome over firefox. It also seems as thought I am banned on safari. Any ideas why?
Status always is detected, using with and without proxies, probably more flags to add to pyppeteer ?
pfile.py", line 1325, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
i get this error when running demo.py in examples
#python3.6 basic.py
python3.6 basic.py
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/sphinxbase/init.py", line 40, in
from .ad_pulse import *
File "/usr/local/lib/python3.6/site-packages/sphinxbase/ad_pulse.py", line 38, in
_ad_pulse = swig_import_helper()
File "/usr/local/lib/python3.6/site-packages/sphinxbase/ad_pulse.py", line 34, in swig_import_helper
_mod = imp.load_module('_ad_pulse', fp, pathname, description)
File "/usr/local/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/usr/local/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: /usr/local/lib/python3.6/site-packages/sphinxbase/_ad_pulse.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyCObject_FromVoidPtr
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "basic.py", line 4, in
from nonocaptcha.solver import Solver
File "/usr/local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 14, in
from nonocaptcha.audio import SolveAudio
File "/usr/local/lib/python3.6/site-packages/nonocaptcha/audio.py", line 15, in
from nonocaptcha.speech import Amazon, Azure, Sphinx, DeepSpeech
File "/usr/local/lib/python3.6/site-packages/nonocaptcha/speech.py", line 20, in
from pocketsphinx.pocketsphinx import Decoder
File "/usr/local/lib/python3.6/site-packages/pocketsphinx/init.py", line 35, in
from sphinxbase import *
File "/usr/local/lib/python3.6/site-packages/sphinxbase/init.py", line 42, in
from .ad_alsa import *
File "/usr/local/lib/python3.6/site-packages/sphinxbase/ad_alsa.py", line 38, in
_ad_alsa = swig_import_helper()
File "/usr/local/lib/python3.6/site-packages/sphinxbase/ad_alsa.py", line 34, in swig_import_helper
_mod = imp.load_module('_ad_alsa', fp, pathname, description)
File "/usr/local/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/usr/local/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: /usr/local/lib/python3.6/site-packages/sphinxbase/_ad_alsa.cpython-36m-x86_64-linux-gnu.so: undefined symbol: PyCObject_FromVoidPtr
Been trying to fix this darn script to just terminate the browser completely after an async_timeout, for the most part I've found most of the causes and have patched them somewhat. But this part right here, I haven't figured out and I'm too irritated to bug with it right now.
Why the heck is this blocking cancellation during downloading? I could maybe understand during mp3 to wav conversion but that doesn't last long and it's piped to ffmpeg, either way it blocks before it reaches that part. Is it the for loop?
solve = self.audio.solve_by_audio
await solve()
Getting this sorted out is my biggest concern right now because when you are running 100 browsers at once and expect them to close when their time is up and they don't...
I'm playing around with the image solving (I haven't pushed these changes yet) but need to host the image files for google to fetch off my server, however for this I need to setup docker.
So far I have done a docker build
and can see the image when do docker image ls
Could you provide an example of how to use this repo with docker in the README?
Thanks again.
hi im using python 3.7.1 on windows x64 Server 2008.
but i got this error :
C:\Users\Administrator\Desktop\nonoCAPTCHA-master\examples>python app.py
Traceback (most recent call last):
File "app.py", line 39, in
asyncio.set_child_watcher(asyncio.FastChildWatcher())
AttributeError: module 'asyncio' has no attribute 'FastChildWatcher'
C:\Users\Administrator\Desktop\nonoCAPTCHA-master\examples>
what is my problem ?
thanks
Hello,
I am getting the following error when trying to run the library:
Traceback (most recent call last):
2018-12-29 15:37:53,698 0 <class 'NotImplementedError'>
File "C:\Users\Asus\AppData\Local\Programs\Python\Python37-32\lib\site-packages\nonocaptcha\solver.py", line 62, in start
2018-12-29 15:37:53,698 0 Time elapsed: 0.01298832893371582
self.browser = await self.get_new_browser()
File "C:\Users\Asus\AppData\Local\Programs\Python\Python37-32\lib\site-packages\nonocaptcha\solver.py", line 183, in get_new_browser
browser = await self.launcher.launch()
File "C:\Users\Asus\AppData\Local\Programs\Python\Python37-32\lib\site-packages\nonocaptcha\launcher.py", line 69, in launch
env=env,
File "C:\Users\Asus\AppData\Local\Programs\Python\Python37-32\lib\asyncio\subprocess.py", line 217, in create_subprocess_exec
stderr=stderr, **kwds)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 1522, in subprocess_exec
bufsize, **kwargs)
File "C:\Users\Asus\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 452, in _make_subprocess_transport
raise NotImplementedError
NotImplementedError
It seems that the problem is that the library is not able to open my browser, but I don't know what is causing this.
demo.py, after adjusting the proxy settings, connecting to the recaptcha demo site and returning a result.
it starts up normally, as soon as communication with the server is expected it crashes with following error:
Exception in callback CompatEventEmitter._emit_run.<locals>._callback(<Task finishe...dy handled.')>) at /usr/local/lib/python3.7/dist-packages/pyee/_compat.py:58
handle: <Handle CompatEventEmitter._emit_run.<locals>._callback(<Task finishe...dy handled.')>) at /usr/local/lib/python3.7/dist-packages/pyee/_compat.py:58>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.7/dist-packages/pyee/_compat.py", line 62, in _callback
self.emit('error', exc)
File "/usr/local/lib/python3.7/dist-packages/pyee/_base.py", line 106, in emit
self._emit_handle_potential_error(event, args[0] if args else None)
File "/usr/local/lib/python3.7/dist-packages/pyee/_base.py", line 83, in _emit_handle_potential_error
raise error
File "/usr/local/lib/python3.7/dist-packages/nonocaptcha/solver.py", line 110, in handle_request
await request.continue_()
File "/usr/local/lib/python3.7/dist-packages/pyppeteer/network_manager.py", line 483, in continue_
raise NetworkError('Request is already handled.')
# Build the Docker container by running "docker build ." in the same folder as
# Dockerfile. After the build is complete, run "docker images" and copy the
# most recent create image. Then run the command "docker run -i -t COPIEDIMAGE"
# which will place you in the shell of the newly created container.
# All files are located in /nonocaptcha.
# This Dockerfile assumes all required files/folders are in the relative
# folder:
# - nonocaptcha.yaml
# - examples/app.py
# - pocketsphinx (folder)
# You may want to add proxies.txt at the bottom of this file.
# We are using Ubuntu 16.04 for the base Docker image
FROM ubuntu:16.04
# This installs all the required packages for Python3.6, Chrome, and
# Pocketsphinx
RUN apt-get update \
&& apt-get install -y \
libpangocairo-1.0-0 \
libx11-xcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxi6 \
libxtst6 \
libnss3 \
libcups2 \
libxss1 \
libxrandr2 \
libgconf-2-4 \
libasound2 \
libasound2-dev \
libatk1.0-0 \
libgtk-3-0 \
gconf-service \
libappindicator1 \
libc6 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgcc1 \
libgdk-pixbuf2.0-0 \
libglib2.0-0 \
libnspr4 \
libpango-1.0-0 \
libpulse-dev \
libstdc++6 \
libx11-6 \
libxcb1 \
libxext6 \
libxfixes3 \
libxrender1 \
libxtst6 \
ca-certificates \
fonts-liberation \
lsb-release \
xdg-utils \
build-essential \
ffmpeg \
swig \
software-properties-common curl \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get remove -y software-properties-common \
&& apt autoremove -y \
&& apt-get update \
&& apt-get install -y python3.7 \
python3.7-dev \
&& curl -o /tmp/get-pip.py "https://bootstrap.pypa.io/get-pip.py" \
&& python3.7 /tmp/get-pip.py \
&& apt-get remove -y curl \
&& apt autoremove -y \
&& pip install nonocaptcha \
&& pip install pyppeteer
RUN python3.7 -c 'import pyppeteer; pyppeteer.chromium_downloader.download_chromium()'
# Copies required files for running nonoCAPTCHA to the Docker container.
# You can comment out pocketsphinx if you aren't using Pocketsphinx.
RUN mkdir /nonocaptcha
ADD pocketsphinx /nonocaptcha/pocketsphinx
ADD nonocaptcha.yaml /nonocaptcha
# ADD proxies.txt /nonocaptcha/proxies.txt
# This determines which file you want to copy over to the Docker container,
# by default the aiohttp server is copied to the container.
ADD examples/* /nonocaptcha/
# Uncomment the lines below if you want to autostart the app and expose the
# port on your machine, which can be accessed by going to http://localhost:5000
# RUN python3.6 /nonocaptcha/app.py
# EXPOSE 5000
i updated to python 3.7 as expected an error in aiohttp to cause the trouble first, i also added the additional command to install chrome successfully. taken from another Issue here.
The setup is headless.
Hello, everytime that i open a page it says that it cant solve recaptcha 'Banned'. Using no proxy or ever so. It work on my normal browser. Is it patched?
Hello! I use your library to collect images from captcha, but the browser does not close. Function cleanup() is called, writes a log 'Browser closed', but browser.close() doesn't work.
I think the args used to call deepspeech from speech.py are incorrect. They should specify which parameters they supply, i.e. the class ought to look like this ...
class DeepSpeech(object): MODEL_DIR = settings["speech"]["deepspeech"]["model_dir"] async def get_text(self, mp3_filename): wav_filename = await mp3_to_wav(mp3_filename) proc = await asyncio.create_subprocess_exec( *[ "deepspeech", '--model' , os.path.join(self.MODEL_DIR, "output_graph.pb"), '--alphabet' , os.path.join(self.MODEL_DIR, "alphabet.txt"), '--lm' , os.path.join(self.MODEL_DIR, "lm.binary"), '--trie' , os.path.join(self.MODEL_DIR, "trie"), '--audio' , wav_filename, ], stdout=asyncio.subprocess.PIPE, ) if not proc.returncode: data = await proc.stdout.readline() result = data.decode("ascii").rstrip() await proc.wait() if result: return result
I've set headless to true as well.
Perhaps you should send this guy a pm on reddit to try get in contact.
https://www.reddit.com/r/Python/comments/910e7t/i_just_made_a_program_using_pyautogui_that_can/
I know the options are there in the example file to ignore SSL errors, yet when I launch the script, it throws an SSL error, saying bad handshake
Hi, I got a problem when i run it:
RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
Also chrome tab isn't opening, i'm a little confused :x
Hello everybody,
I am at the very beginning.
I have created azure and aws accounts setup my nonocaptcha.example.yaml but it still says that I need to create a yaml file and it overwrites the filled nonocaptcha.example.yaml.
So I am blocked at this initial step.
Anybody could suggest to me what I am doing wrong?
This issue has been reported on pyppeteer's repository but hasn't yet been looked over. I've been trying to patch with launcher.py but have been unsuccessful so far.
miyakogi/pyppeteer#78
https://stackoverflow.com/questions/50556507/pyppeteer-script-crashing-after-pressing-ctrlc
i continue to see the issue and in command line i get this:
`$ python3 demo.py
2018-12-25 17:40:35,098 0 Starting solver with proxy http://xxxxxx:53281
2018-12-25 17:40:49,151 0 Clicking checkbox
2018-12-25 17:40:54,394 0 Clicking audio button
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 74, in start
result = await self.solve()
File "/usr/local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 275, in solve
return await self._solve()
File "/usr/local/lib/python3.6/site-packages/nonocaptcha/solver.py", line 310, in _solve
result = await self.loop.create_task(solve())
File "/usr/local/lib/python3.6/site-packages/nonocaptcha/audio.py", line 34, in solve_by_audio
self.get_audio_response())
File "/usr/local/lib/python3.6/site-packages/nonocaptcha/audio.py", line 60, in get_audio_response
raise DownloadError("Audio url is not valid, aborting")
nonocaptcha.exceptions.DownloadError: Audio url is not valid, aborting
2018-12-25 17:40:59,875 0 Audio url is not valid, aborting <class 'nonocaptcha.exceptions.DownloadError'>
2018-12-25 17:41:00,358 0 Browser closed
2018-12-25 17:41:00,358 0 Time elapsed: 26.60468864440918`
how to fix that?
Originally posted by @AlessandroSpallina in #42 (comment)
I`m working with a nonoCAPTCHA example, and every time a run it, I got a error message from Google, saying that my computer is being controlled by a automated software.
I see you bypass this with the override script data, and another things in the chromedriver options. You have a recommended chromedriver and chrome version to run your examples, or Google was faster and update the recaptcha to work against your bot?
Thks.
$ pip3 install nonocaptcha
Collecting nonocaptcha
Using cached https://files.pythonhosted.org/packages/62/ca/1d7b8da26c8a994e49d74bc1521a64ec7e740b70bd04ba711cc78f079b3a/nonocaptcha-1.0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-GmLmCS/nonocaptcha/setup.py", line 3, in
from importlib.machinery import SourceFileLoader
ImportError: No module named machinery
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-GmLmCS/nonocaptcha/
Hey, i have got not only an error, but 2!
First error :
Traceback (most recent call last): File "main.py", line 3, in <module> from nonocaptcha import Settings ImportError: cannot import name 'Settings'
I tried fixing this one by adding .base to nonocaptcha from
from nonocaptcha import settings
to
from nonocaptcha.base import settings
,
this resulted in the second error:
Traceback (most recent call last): File "main.py", line 7, in <module> pageurl = settings["run", "http://url.com/"] KeyError: ('run', 'http://url.com/')
I realise the second error might be absolutely useless, i do not get the first one tho.
Let me know if i need to send anything else.
Hi,
Any chance that the Azure service is not using the:
wss://speech.platform.bing.com/speech/recognition/dictation/cogn
in the code,
But endpoints in the documentations of M$:
https://<eastus2>.api.cognitive.microsoft.com/sts/v1.0/issuetoken
and other regional endpoints alike?
I lost access to this account and I've been working on a new version of this with image solving and audio solving support using Playwright instead of Pyppeteer.
Check it out here: https://github.com/embium/playwright-nonocaptcha
I'm experiencing an issue copying files from an absolute folder on a host machine to a docker container. I'm looking for anyone with experience with setting up a Dockerfile who can help out or lend some advice on what I'm doing incorrectly. I already have a Dockerfile in the root Repo, and the files I'm trying to copy over are already in place, except it doesn't work.
The custom NonoCAPTCHA tab times out everytime whereas just opening a new tab to the same link works perfectly.
How would I go about, for example, clicking on a button and entering text before the captcha solving begins? I've attempted many methods, but none work or end up creating a new process of Pyppeteer.
title says all
[shxck@shxck ~]$ python captcha.py Traceback (most recent call last): File "captcha.py", line 3, in <module> from nonocaptcha.solver import Solver File "/usr/lib/python3.6/site-packages/nonocaptcha/solver.py", line 16, in <module> from nonocaptcha.base import Base, SafePassage File "/usr/lib/python3.6/site-packages/nonocaptcha/base.py", line 28, in <module> class Base(Clicker): File "/usr/lib/python3.6/site-packages/nonocaptcha/base.py", line 42, in Base override_data = os.path.join(package_dir, settings["data"]["override_js"]) KeyError: 'override_js'
During my testing, I've become aware of an issue where headless is being detected as automation while not headless proceeds to the audio step with no problems. Looking for the culprit and will release an update.
Hi, I was testing your code and it works perfectly with GUI, try to test it on a server without a GUI & the headless = True and this expels the following error.
Data:
My code:
import asyncio
from nonocaptcha.solver import Solver
pageurl = "page"
sitekey = "sitekey"
args = ['--no-sandbox', '--user-data-dir', '--timeout 15', '--disable-setuid-sandbox']
options = {"ignoreHTTPSErrors": True, "args": args}
client = Solver(
pageurl, sitekey, options=options, proxy=None, proxy_auth=None)
solution = asyncio.get_event_loop().run_until_complete(client.start())
if solution:
print(solution)
Output:
var/www/project_test/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.
settings = yaml.load(f)
headless is True
Traceback (most recent call last):
File "/var/www/project_test/nonocaptcha/solver.py", line 62, in start
self.browser = await self.get_new_browser()
File "/var/www/project_test/nonocaptcha/solver.py", line 190, in get_new_browser
browser = await self.launcher.launch()
File "/var/www/project_test/nonocaptcha/launcher.py", line 75, in launch
self.browserWSEndpoint = await self._get_ws_endpoint()
File "/var/www/project_test/nonocaptcha/launcher.py", line 94, in _get_ws_endpoint
await self.proc.stdout.read().decode()
AttributeError: 'NoneType' object has no attribute 'read'
2019-07-03 14:54:29,096 0 'NoneType' object has no attribute 'read' <class 'AttributeError'>
2019-07-03 14:54:29,096 0 Browser closed
2019-07-03 14:54:29,096 0 Time elapsed: 0.11781907081604004
Try to check if the headless=True and printed if it is true just to be sure of it but it not work!
I read the issues looking for some kind of solution and nothing. Might you help me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.