Skip to content

Scihub2pdf not works now! I guess the base scihub url root has changed. #17

Description

@forechoandlook

image

root@ecs-6e13:~# scihub2pdf  doi:10.1016/j.patcog.2016.10.023  --uselibgen

	 Using Libgen.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 144, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 357, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.6/http/client.py", line 1281, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1327, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1276, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1042, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 980, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 153, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fbf0d0f29e8>: Failed to establish a new connection: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='libgen.io', port=80): Max retries exceeded with url: /scimag/ads.php?doi=doi%3A10.1016%2Fj.patcog.2016.10.023&downloadname= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fbf0d0f29e8>: Failed to establish a new connection: [Errno -5] No address associated with hostname',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/scihub2pdf", line 191, in <module>
    main()
  File "/usr/local/bin/scihub2pdf", line 148, in main
    download_from_doi(value, location, use_libgen)
  File "/usr/local/lib/python3.6/dist-packages/scihub2pdf/download.py", line 161, in download_from_doi
    download_from_libgen(doi, pdf_file)
  File "/usr/local/lib/python3.6/dist-packages/scihub2pdf/download.py", line 68, in download_from_libgen
    found, r = ScrapLib.navigate_to(doi, pdf_file)
  File "/usr/local/lib/python3.6/dist-packages/scihub2pdf/libgen.py", line 44, in navigate_to
    headers=self.headers
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 520, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 630, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='libgen.io', port=80): Max retries exceeded with url: /scimag/ads.php?doi=doi%3A10.1016%2Fj.patcog.2016.10.023&downloadname= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fbf0d0f29e8>: Failed to establish a new connection: [Errno -5] No address associated with hostname',))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions