Ovear / kemono-dl

A simple kemono.party downloader using python.
109 stars 11 forks source link

ERROR:No creator information was retrieved. #4

Closed Pil0tXia closed 1 year ago

Pil0tXia commented 1 year ago

Version

Version: this repository 2022.04.28

Command

python kemono-dl.py --cookies "cookie.txt" --links https://kemono.party/fantia/user/475109

log

ERROR:Unable to get list of creators from kemono.party
Traceback (most recent call last):
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 700, in urlopen
    self._prepare_proxy(conn)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 994, in _prepare_proxy
    conn.connect()
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 364, in connect
    self.sock = conn = self._connect_tls_proxy(hostname, conn)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 499, in _connect_tls_proxy
    socket = ssl_wrap_socket(
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1131)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 440, in send
    resp = conn.urlopen(
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 813, in urlopen
    return self.urlopen(
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 813, in urlopen
    return self.urlopen(
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 813, in urlopen
    return self.urlopen(
  [Previous line repeated 2 more times]
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='kemono.party', port=443): Max retries exceeded with url: /api/creators/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\[Buffer]\kemono-dl-main\src\main.py", line 660, in start_download
    self.creators += self.get_creators(domain)
  File "D:\[Buffer]\kemono-dl-main\src\main.py", line 103, in get_creators
    return self.session.get(url=creators_api, cookies=self.cookies, headers=self.headers, timeout=self.timeout).json()
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 542, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='kemono.party', port=443): Max retries exceeded with url: /api/creators/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)')))
ERROR:No creator information was retrieved. | exiting

备注

AlphaSlayer1964的版本也会报这个错误。 clash直连/规则/全局都可以正常访问kemono 但是在cmd中,无论clash开没开TUN模式、用set http_proxy=http://127.0.0.1:7890set https_proxy=https://127.0.0.1:7890设置代理,都报同样的错误。 期待回复,谢谢。

Ovear commented 1 year ago

这个一般是代理本身的问题了

ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1131)

Pil0tXia commented 1 year ago

退出clash后,cmd长时间没有回显。意思是代理节点的问题吗?可是选中的代理节点都能正常访问网站

Pil0tXia commented 1 year ago

AlphaSlayer1964版在没有开clash的情况下返回了这些错误:

ERROR:Unable to get posts for https://kemono.party/fantia/user/475109
Traceback (most recent call last):
  File "D:\[Buffer]\kemono-dl-2022.04.27\src\main.py", line 641, in start_download
    self.get_post(url)
  File "D:\[Buffer]\kemono-dl-2022.04.27\src\main.py", line 161, in get_post
    post = self.clean_post(post, user, site)
  File "D:\[Buffer]\kemono-dl-2022.04.27\src\main.py", line 329, in clean_post
    new_post['post_variables']['user_updated'] = datetime.datetime.strptime(user['updated'], r'%a, %d %b %Y %H:%M:%S %Z').strftime(self.date_strf_pattern) if user['updated'] else None
TypeError: strptime() argument 1 must be str, not float
Ovear commented 1 year ago

如果是这种情况,很可能是代理没挂上了。

Pil0tXia commented 1 year ago

ovear版在没有开clash的情况下返回了这些错误:

ERROR:Unable to get list of creators from kemono.party
Traceback (most recent call last):
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\response.py", line 441, in _error_catcher
    yield
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\response.py", line 522, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 455, in read
    n = self.readinto(b)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 499, in readinto
    n = self.fp.readinto(b)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\models.py", line 760, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\response.py", line 579, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\response.py", line 544, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\response.py", line 446, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='kemono.party', port=443): Read timed out.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\[Buffer]\kemono-dl-main\src\main.py", line 660, in start_download
    self.creators += self.get_creators(domain)
  File "D:\[Buffer]\kemono-dl-main\src\main.py", line 103, in get_creators
    return self.session.get(url=creators_api, cookies=self.cookies, headers=self.headers, timeout=self.timeout).json()
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 542, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 687, in send
    r.content
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\models.py", line 838, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "C:\Users\18377\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\models.py", line 767, in generate
    raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='kemono.party', port=443): Read timed out.
ERROR:No creator information was retrieved. | exiting

DNS 223.5.5.5,可以裸连kemono

Ovear commented 1 year ago

set https_proxy=https://127.0.0.1:7890

挂代理的方式错了,改成下面这个就可以了

set https_proxy=http://127.0.0.1:7890

Pil0tXia commented 1 year ago

感谢!事实上我不用挂代理,看到这个forkAttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'报错后将python从3.8升级到了3.10,然后你的和L4cache的都可以正常使用了。 (期待你和他能共同维护一个社区版本)