Closed azamet90 closed 4 years ago
See: https://stackoverflow.com/questions/61780476/pyppeteer-browser-closed-unexpectedly-in-aws-lambda I want to create new argument with chrome path for fix that. SAlu2s
python3 d.py 100%|████████████████████████████████████████████████████████| 108773488/108773488 [00:17<00:00, 6249424.01it/s] Traceback (most recent call last): File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/solver.py", line 36, in start self.browser = await self.get_new_browser() File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/base.py", line 267, in get_new_browser browser = await self.launcher.launch() File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 166, in launch self.browserWSEndpoint = get_ws_endpoint(self.url) File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint raise BrowserError('Browser closed unexpectedly:\n') pyppeteer.errors.BrowserError: Browser closed unexpectedly: Pyppeteer error: Browser closed unexpectedly: 2020-07-23 01:47:49,372 [0] Browser closed Time elapsed: 49.359614610672
and no browser is opening nothing... i have geckodriver and selenium installed if it was needed but at the end point the thing is; it is not working on me! but thanks for even working on it... i hope it is fixable... thanks for help
edit: and the code was which i was trying is:
from goodbyecaptcha.solver import Solver pageurl = "https://www.google.com/recaptcha/api2/demo" proxy = "127.0.0.1:1000" auth_details = {"username": "user", "password": "pass"} args = ["--timeout 5"] options = {"ignoreHTTPSErrors": True, "args": args} client = Solver( # With Proxy # pageurl, lang='en-US', options=options, proxy=proxy, proxy_auth=auth_details # Without Proxy pageurl, lang='en-US', options=options ) solution = client.loop.run_until_complete(client.start()) if solution: print(solution)
Try now, install this library via Github and use:
from goodbyecaptcha.solver import Solver
pageurl = "https://www.google.com/recaptcha/api2/demo"
proxy = "127.0.0.1:1000"
auth_details = {"username": "user", "password": "pass"}
args = ["--timeout 5"]
options = {"ignoreHTTPSErrors": True, "args": args}
client = Solver(
# With Proxy
# pageurl, lang='en-US', chromePath="YOU_CHROME_PATH", options=options, proxy=proxy, proxy_auth=auth_details
# Without Proxy
pageurl, lang='en-US', chromePath="YOU_CHROME_PATH", options=options
)
solution = client.loop.run_until_complete(client.start())
if solution:
print(solution)
See more information about this fix: https://github.com/pyppeteer/pyppeteer/issues/108 SAlu2s
See: https://stackoverflow.com/questions/61780476/pyppeteer-browser-closed-unexpectedly-in-aws-lambda I want to create new argument with chrome path for fix that. SAlu2s
does it means that this will work only on chrome?
See: https://stackoverflow.com/questions/61780476/pyppeteer-browser-closed-unexpectedly-in-aws-lambda I want to create new argument with chrome path for fix that. SAlu2s
does it means that this will work only on chrome?
Remember, this project work with pyppeteer ... chrome browser ... SAlu2s
See: https://stackoverflow.com/questions/61780476/pyppeteer-browser-closed-unexpectedly-in-aws-lambda I want to create new argument with chrome path for fix that. SAlu2s
does it means that this will work only on chrome?
Remember, this project work with pyppeteer ... chrome browser ... SAlu2s
okay thanks im now trying
See: https://stackoverflow.com/questions/61780476/pyppeteer-browser-closed-unexpectedly-in-aws-lambda I want to create new argument with chrome path for fix that. SAlu2s
does it means that this will work only on chrome?
Remember, this project work with pyppeteer ... chrome browser ... SAlu2s
2.4.1 was the version of your library sir i did tryed that what you send me without installing the library from github but the result was same but if you mean i need to download it from github i will...
edit:
from goodbyecaptcha.solver import Solver
pageurl = "https://www.google.com/recaptcha/api2/demo"
proxy = "127.0.0.1:1000"
auth_details = {"username": "user", "password": "pass"}
args = ["--timeout 5"]
options = {"ignoreHTTPSErrors": True, "args": args}
client = Solver(
# With Proxy
# pageurl, lang='en-US', chromePath="/usr/bin/chromium", options=options, proxy=proxy, proxy_auth=auth_details
# Without Proxy
pageurl, lang='en-US', chromePath="/usr/bin/chromium", options=options
)
solution = client.loop.run_until_complete(client.start())
if solution:
print(solution)
ups sorry now i see u changed 2 files and i will do it now
edit: so after installing the github source and trying again the results was same :(
from goodbyecaptcha.solver import Solver
pageurl = "https://www.google.com/recaptcha/api2/demo"
proxy = "127.0.0.1:1000"
auth_details = {"username": "user", "password": "pass"}
args = ["--timeout 5"]
options = {"ignoreHTTPSErrors": True, "args": args}
client = Solver(
# With Proxy
# pageurl, lang='en-US', chromePath="/usr/bin/chromium", options=options, proxy=proxy, proxy_auth=auth_details
# Without Proxy
pageurl, lang='en-US', chromePath="/usr/bin/chromium", options=options
)
solution = client.loop.run_until_complete(client.start())
if solution:
print(solution)
python3 d.py
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/goodbyecaptcha-2.4.1-py3.8.egg/goodbyecaptcha/solver.py", line 39, in start
self.browser = await self.get_new_browser()
File "/usr/local/lib/python3.8/dist-packages/goodbyecaptcha-2.4.1-py3.8.egg/goodbyecaptcha/base.py", line 272, in get_new_browser
browser = await self.launcher.launch()
File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 166, in launch
self.browserWSEndpoint = get_ws_endpoint(self.url)
File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint
raise BrowserError('Browser closed unexpectedly:\n')
pyppeteer.errors.BrowserError: Browser closed unexpectedly:
Pyppeteer error: Browser closed unexpectedly:
2020-07-23 19:47:34,580 [0] Browser closed
Time elapsed: 30.01535677909851
the installation i did was is:
sometimes i get this error:
python3 d.py
2020-07-23 19:50:42,413 Error occurred during loading data. Trying to use cache server https://fake-useragent.herokuapp.com/browsers/0.1.11
Traceback (most recent call last):
File "/usr/lib/python3.8/urllib/request.py", line 1350, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.8/http/client.py", line 1240, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1286, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1235, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1006, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 946, in send
self.connect()
File "/usr/lib/python3.8/http/client.py", line 917, in connect
self.sock = self._create_connection(
File "/usr/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/usr/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 64, in get
with contextlib.closing(urlopen(
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 1379, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.8/urllib/request.py", line 1353, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error timed out>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 164, in load
browsers_dict[browser_key] = get_browser_versions(
File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 120, in get_browser_versions
html = get(
File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 84, in get
raise FakeUserAgentError('Maximum amount of retries reached')
fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached
Traceback (most recent call last):
File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/solver.py", line 36, in start
self.browser = await self.get_new_browser()
File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/base.py", line 267, in get_new_browser
browser = await self.launcher.launch()
File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 166, in launch
self.browserWSEndpoint = get_ws_endpoint(self.url)
File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint
raise BrowserError('Browser closed unexpectedly:\n')
pyppeteer.errors.BrowserError: Browser closed unexpectedly:
Pyppeteer error: Browser closed unexpectedly:
2020-07-23 19:51:14,043 [0] Browser closed
Time elapsed: 42.60003924369812
python3 d.py 100%|████████████████████████████████████████████████████████| 108773488/108773488 [00:17<00:00, 6249424.01it/s] Traceback (most recent call last): File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/solver.py", line 36, in start self.browser = await self.get_new_browser() File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/base.py", line 267, in get_new_browser browser = await self.launcher.launch() File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 166, in launch self.browserWSEndpoint = get_ws_endpoint(self.url) File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint raise BrowserError('Browser closed unexpectedly:\n') pyppeteer.errors.BrowserError: Browser closed unexpectedly: Pyppeteer error: Browser closed unexpectedly: 2020-07-23 01:47:49,372 [0] Browser closed Time elapsed: 49.359614610672
and no browser is opening nothing... i have geckodriver and selenium installed if it was needed but at the end point the thing is; it is not working on me! but thanks for even working on it... i hope it is fixable... thanks for help
edit: and the code was which i was trying is:
from goodbyecaptcha.solver import Solver pageurl = "https://www.google.com/recaptcha/api2/demo" proxy = "127.0.0.1:1000" auth_details = {"username": "user", "password": "pass"} args = ["--timeout 5"] options = {"ignoreHTTPSErrors": True, "args": args} client = Solver( # With Proxy # pageurl, lang='en-US', options=options, proxy=proxy, proxy_auth=auth_details # Without Proxy pageurl, lang='en-US', options=options ) solution = client.loop.run_until_complete(client.start()) if solution: print(solution)
python3 d.py 100%|████████████████████████████████████████████████████████| 108773488/108773488 [00:17<00:00, 6249424.01it/s] Traceback (most recent call last): File "/home/atom/.local/lib/python3.8/site-packages/goodbyecaptcha/solver.py", line 36, in start self.browser = await self.get_new_browser() File "/home/atom/.local/lib/python3.8/site-packages/goodbyecaptcha/base.py", line 267, in get_new_browser browser = await self.launcher.launch() File "/home/atom/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 166, in launch self.browserWSEndpoint = get_ws_endpoint(self.url) File "/home/atom/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint raise BrowserError('Browser closed unexpectedly:\n') pyppeteer.errors.BrowserError: Browser closed unexpectedly:
Pyppeteer error: Browser closed unexpectedly:
2020-07-23 04:32:15,372 [0] Browser closed Time elapsed: 49.359614610672
did you find any solution for this? i have the same problem
edit: so after installing the github source and trying again the results was same :(
from goodbyecaptcha.solver import Solver pageurl = "https://www.google.com/recaptcha/api2/demo" proxy = "127.0.0.1:1000" auth_details = {"username": "user", "password": "pass"} args = ["--timeout 5"] options = {"ignoreHTTPSErrors": True, "args": args} client = Solver( # With Proxy # pageurl, lang='en-US', chromePath="/usr/bin/chromium", options=options, proxy=proxy, proxy_auth=auth_details # Without Proxy pageurl, lang='en-US', chromePath="/usr/bin/chromium", options=options ) solution = client.loop.run_until_complete(client.start()) if solution: print(solution)
python3 d.py Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/goodbyecaptcha-2.4.1-py3.8.egg/goodbyecaptcha/solver.py", line 39, in start self.browser = await self.get_new_browser() File "/usr/local/lib/python3.8/dist-packages/goodbyecaptcha-2.4.1-py3.8.egg/goodbyecaptcha/base.py", line 272, in get_new_browser browser = await self.launcher.launch() File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 166, in launch self.browserWSEndpoint = get_ws_endpoint(self.url) File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint raise BrowserError('Browser closed unexpectedly:\n') pyppeteer.errors.BrowserError: Browser closed unexpectedly: Pyppeteer error: Browser closed unexpectedly: 2020-07-23 19:47:34,580 [0] Browser closed Time elapsed: 30.01535677909851
the installation i did was is:
* git clone https://github.com/MacKey-255/GoodByeCatpcha.git * sudo python3 setup.py install * run the file...
sometimes i get this error:
python3 d.py 2020-07-23 19:50:42,413 Error occurred during loading data. Trying to use cache server https://fake-useragent.herokuapp.com/browsers/0.1.11 Traceback (most recent call last): File "/usr/lib/python3.8/urllib/request.py", line 1350, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/usr/lib/python3.8/http/client.py", line 1240, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1286, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1235, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1006, in _send_output self.send(msg) File "/usr/lib/python3.8/http/client.py", line 946, in send self.connect() File "/usr/lib/python3.8/http/client.py", line 917, in connect self.sock = self._create_connection( File "/usr/lib/python3.8/socket.py", line 808, in create_connection raise err File "/usr/lib/python3.8/socket.py", line 796, in create_connection sock.connect(sa) socket.timeout: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 64, in get with contextlib.closing(urlopen( File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1379, in http_open return self.do_open(http.client.HTTPConnection, req) File "/usr/lib/python3.8/urllib/request.py", line 1353, in do_open raise URLError(err) urllib.error.URLError: <urlopen error timed out> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 164, in load browsers_dict[browser_key] = get_browser_versions( File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 120, in get_browser_versions html = get( File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 84, in get raise FakeUserAgentError('Maximum amount of retries reached') fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached Traceback (most recent call last): File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/solver.py", line 36, in start self.browser = await self.get_new_browser() File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/base.py", line 267, in get_new_browser browser = await self.launcher.launch() File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 166, in launch self.browserWSEndpoint = get_ws_endpoint(self.url) File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint raise BrowserError('Browser closed unexpectedly:\n') pyppeteer.errors.BrowserError: Browser closed unexpectedly: Pyppeteer error: Browser closed unexpectedly: 2020-07-23 19:51:14,043 [0] Browser closed Time elapsed: 42.60003924369812
Installation
$ 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
$ pip install git+https://github.com/MacKey-255/GoodByeCatpcha.git
And follow this video: https://www.youtube.com/watch?v=hPYMUdQ2aV8 Try use Python 3.7 SAlu2s
did you find any solution for this? i have the same problem
looks like would be better if use this with firefox and geckodriver which files we need to change to use it with geckodriver? or is it posible?
looks like would be better if use this with firefox and geckodriver which files we need to change to use it with geckodriver? or is it posible?
Not is possible, for this you need change all interaction code :/ because it work with pyppeteer chrome browser only. I don't understand why you have this error. Are you use Python 3.7 and follow all installation steps?
looks like would be better if use this with firefox and geckodriver which files we need to change to use it with geckodriver? or is it posible?
Not is possible, for this you need change all interaction code :/ because it work with pyppeteer chrome browser only. I don't understand why you have this error. Are you use Python 3.7 and follow all installation steps?
my friend is using python version 3.6.9 and it works but... it is detecting the images but it is sadly not finishing the recaptcha it says everytime try again on recaptcha... image detecting works just fine but cannot finish it... and im still using 3.8.5 and get that error i already posted here but sometimes extra error i get this one:
python3 d.py
2020-07-24 22:28:11,761 Error occurred during loading data. Trying to use cache server https://fake-useragent.herokuapp.com/browsers/0.1.11
Traceback (most recent call last):
File "/usr/lib/python3.8/urllib/request.py", line 1350, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1010, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 950, in send
self.connect()
File "/usr/lib/python3.8/http/client.py", line 921, in connect
self.sock = self._create_connection(
File "/usr/lib/python3.8/socket.py", line 808, in create_connection
raise err
File "/usr/lib/python3.8/socket.py", line 796, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 64, in get
with contextlib.closing(urlopen(
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 1379, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.8/urllib/request.py", line 1353, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error timed out>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 164, in load
browsers_dict[browser_key] = get_browser_versions(
File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 120, in get_browser_versions
html = get(
File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 84, in get
raise FakeUserAgentError('Maximum amount of retries reached')
fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached
Traceback (most recent call last):
File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/solver.py", line 39, in start
self.browser = await self.get_new_browser()
File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/base.py", line 272, in get_new_browser
browser = await self.launcher.launch()
File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 166, in launch
self.browserWSEndpoint = get_ws_endpoint(self.url)
File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint
raise BrowserError('Browser closed unexpectedly:\n')
pyppeteer.errors.BrowserError: Browser closed unexpectedly:
Pyppeteer error: Browser closed unexpectedly:
2020-07-24 22:28:43,168 [0] Browser closed
Time elapsed: 42.87568116188049
but the other thing is my friend does not have installed chromium but it opens chromium? and i read in somewhere that preinstalled chromium is doing this problem on pyppeteer but i still did not tryed it was still doing some research...
edit: i did tryed to install chromium and try it on that but the result is same. also it haves nothing to do with if it is preinstalled or not.
looks like would be better if use this with firefox and geckodriver which files we need to change to use it with geckodriver? or is it posible?
Not is possible, for this you need change all interaction code :/ because it work with pyppeteer chrome browser only. I don't understand why you have this error. Are you use Python 3.7 and follow all installation steps?
my friend is using python version 3.6.9 and it works but... it is detecting the images but it is sadly not finishing the recaptcha it says everytime try again on recaptcha... image detecting works just fine but cannot finish it... and im still using 3.8.5 and get that error i already posted here but sometimes extra error i get this one:
python3 d.py 2020-07-24 22:28:11,761 Error occurred during loading data. Trying to use cache server https://fake-useragent.herokuapp.com/browsers/0.1.11 Traceback (most recent call last): File "/usr/lib/python3.8/urllib/request.py", line 1350, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/usr/lib/python3.8/http/client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1010, in _send_output self.send(msg) File "/usr/lib/python3.8/http/client.py", line 950, in send self.connect() File "/usr/lib/python3.8/http/client.py", line 921, in connect self.sock = self._create_connection( File "/usr/lib/python3.8/socket.py", line 808, in create_connection raise err File "/usr/lib/python3.8/socket.py", line 796, in create_connection sock.connect(sa) socket.timeout: timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 64, in get with contextlib.closing(urlopen( File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.8/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/lib/python3.8/urllib/request.py", line 542, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain result = func(*args) File "/usr/lib/python3.8/urllib/request.py", line 1379, in http_open return self.do_open(http.client.HTTPConnection, req) File "/usr/lib/python3.8/urllib/request.py", line 1353, in do_open raise URLError(err) urllib.error.URLError: <urlopen error timed out> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 164, in load browsers_dict[browser_key] = get_browser_versions( File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 120, in get_browser_versions html = get( File "/home/azamet/.local/lib/python3.8/site-packages/fake_useragent/utils.py", line 84, in get raise FakeUserAgentError('Maximum amount of retries reached') fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached Traceback (most recent call last): File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/solver.py", line 39, in start self.browser = await self.get_new_browser() File "/home/azamet/.local/lib/python3.8/site-packages/goodbyecaptcha/base.py", line 272, in get_new_browser browser = await self.launcher.launch() File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 166, in launch self.browserWSEndpoint = get_ws_endpoint(self.url) File "/home/azamet/.local/lib/python3.8/site-packages/pyppeteer/launcher.py", line 225, in get_ws_endpoint raise BrowserError('Browser closed unexpectedly:\n') pyppeteer.errors.BrowserError: Browser closed unexpectedly: Pyppeteer error: Browser closed unexpectedly: 2020-07-24 22:28:43,168 [0] Browser closed Time elapsed: 42.87568116188049
but the other thing is my friend does not have installed chromium but it opens chromium? and i read in somewhere that preinstalled chromium is doing this problem on pyppeteer but i still did not tryed it was still doing some research...
edit: i did tryed to install chromium and try it on that but the result is same. also it haves nothing to do with if it is preinstalled or not.
I installed the library on a server with chrome pre-installed and it works perfectly, with version 3.7 of Python and with the steps I gave you previously. With python 3.6, do you have the error that the captcha does not finish? Have you tried training the YoloV3 neural network of the library? This library uses YoloV3 with pre-trained objects, you need to train with the captcha objects. I don't have the conditions to do it so you have to do it yourself. Use Python 3.7 is better and I go to fix the Fake Agent Exception with this issue comment: https://github.com/hellysmile/fake-useragent/issues/53#issuecomment-332732039 Thanks for feedback, keep testing and tell me how it goes?
i think i find a solution :D --no-sandbox works just fine im still doing tests but fakeuseragent problem is not a problem i can fix im new on python but im working hard to learn it the commands i tryed was this:
from goodbyecaptcha.solver import Solver
pageurl = "https://www.google.com/recaptcha/api2/demo"
proxy = "127.0.0.1:1000"
auth_details = {"username": "user", "password": "pass"}
args = ["--no-sandbox"]
options = {"ignoreHTTPSErrors": True, "args": args}
client = Solver(
# With Proxy
# pageurl, lang='en-US', chromePath="/usr/bin/chromium", options=options, proxy=proxy, proxy_auth=auth_details
# Without Proxy
pageurl, lang='en-US', chromePath="/usr/bin/chromium", options=options
)
solution = client.loop.run_until_complete(client.start())
if solution:
print(solution)
but before i train the yolov3 i cannot understand why it is finding the correct images solving it correct but google says try again?
edit: no need to give chrome path
The neural network is pre-trained and recognizes 70% of the objects but not all. Google says try again for various reasons, when you start testing a lot and solving many captcha correctly, google adds you as a trusted user in statistics. If you train the neural network you get more effectiveness solving captcha and less try again. Good luck with that :)
I need create a wiki for this project. Although everything is very well commented.. Comming soon. SAlu2s
and no browser is opening nothing... i have geckodriver and selenium installed if it was needed but at the end point the thing is; it is not working on me! but thanks for even working on it... i hope it is fixable... thanks for help
edit: and the code was which i was trying is: