gtkpad / downdetector_scrapper

GNU Lesser General Public License v3.0
16 stars 40 forks source link

Resultados Sempre Zeros #6

Open ricofeanco opened 3 years ago

ricofeanco commented 3 years ago

Prezado, o resultado de todas as consultas estão retornando sempre 0 "zero" = Não esta sendo possível verificar "nome do serviço" . Poderiramos verificar se ocorreram mudanças no site novamente ? Obrigado

ResolvServices commented 3 years ago

O Downdetector esta solicitando captcha pela Cloudflare

leandroschatts commented 3 years ago

Olá, Parou de funcionar novamente?

Tentei instalar ontem pela primeira vez, e está dando esses erros:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 366, in connect self.sock = ssl_wrapsocket( File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 370, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.8/ssl.py", line 1040, in _create self.do_handshake() File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 400, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3/dist-packages/six.py", line 702, in reraise raise value.with_traceback(tb) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 366, in connect self.sock = ssl_wrapsocket( File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 370, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.8/ssl.py", line 1040, in _create self.do_handshake() File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "./downdetector.py", line 94, in response = request(site) File "./downdetector.py", line 70, in request return scraper.get(url) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get return self.request('GET', url, kwargs) File "/usr/local/lib/python3.8/dist-packages/cloudscraper/init.py", line 263, in request self.perform_request(method, url, *args, *kwargs) File "/usr/local/lib/python3.8/dist-packages/cloudscraper/init.py", line 182, in perform_request return super(CloudScraper, self).request(method, url, args, kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

hitalosalucci commented 3 years ago

Bom, por aqui verifiquei que o Downdetector sempre solicita capcha. Tentamos utilizar algum tipo de proxy, mudava o ip sempre, porém ainda assim solicitava capcha. Ao acessar através do navegador também há esse tipo de proteção. Há algum tipo de solução encontrada para burlarmos a Claudflare, até o momento?

Vincius-Lemos commented 3 years ago

Olá!

Conseguiram encontrar alguma solução?

jhxrdvn commented 1 year ago

[ZABBIX 6.0] Olá! Dentro do arquivo "downdetector.py" localize o seguinte trecho:

def request(dd_site): url = "https://downdetector.com.br/fora-do-ar/{}/".format(dd_site) if not craw: print(0) exit() elif craw == "cloudscraper": scraper = cloudscraper.create_scraper() return scraper.get(url) else: return requests.get(url, headers={'User-Agent': random.choice(user_agent_list)}) Remova o "s" do link, ficando "http://downdetector.com.br/fora-do-ar/{}/".format(dd_site)". Assim as consultas funcionarão.