yhzhoucs / archive-book-downloader

A simple script to download borrowed books in Internet Archive
7 stars 1 forks source link

Too many errors, can you help? #2

Open gnusupport opened 1 year ago

gnusupport commented 1 year ago
    resp = requests.post(URLS['loan'], cookies=cookies_jar, data=self.__data, proxies=PROXY if USING_PROXY else None, timeout=REQUEST_TIMEOUT)
  File "/home/data1/protected/.local/lib/python3.10/site-packages/requests/api.py", line 117, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/data1/protected/.local/lib/python3.10/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/data1/protected/.local/lib/python3.10/site-packages/requests/sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/data1/protected/.local/lib/python3.10/site-packages/requests/sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "/home/data1/protected/.local/lib/python3.10/site-packages/requests/adapters.py", line 513, in send
    raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='archive.org', port=443): Max retries exceeded with url: /services/loans/loan (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4455d17340>: Failed to establish a new connection: [Errno 111] Connection refused')))
..... Successful!

========================================
Task Complete!

Total download: 0
        Done: 0
        Fail: 0
~/Programming/git/archive-book-downloader
$ python src/download.py cr
yhzhoucs commented 1 year ago

If you don't use proxy, you should give the option d explicitly (see README)

python3 src/download.py d      # download without proxy
gnusupport commented 1 year ago

Thanks, step by step I move forward.

I see this error:

~/Programming/git/archive-book-downloader
$ python3 src/download.py d
/home/data1/protected/.local/lib/python3.10/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.1.0)/charset_normalizer (2.0.12) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
cookies >