大致有两类异常报错,一类是远程未连接,一类是ssl错误,前者居多。日志分别如下
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1371, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 319, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 288, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1371, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 319, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 288, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/torcp", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.9/site-packages/torcp/torcp.py", line 965, in main
processOneDirItem(parentLocation, itemName, folderimdb)
File "/usr/lib/python3.9/site-packages/torcp/torcp.py", line 688, in processOneDirItem
p.parse(itemName, useTMDb=(ARGS.tmdb_api_key is not None), hasIMDbId=imdbidstr)
File "/usr/lib/python3.9/site-packages/torcp/tmdbparser.py", line 106, in parse
self.searchTMDb(self.title, self.tmdbcat,
File "/usr/lib/python3.9/site-packages/torcp/tmdbparser.py", line 369, in searchTMDb
results = search.movies({"query": s[1], "year": str(intyear), "page": 1})
File "/usr/lib/python3.9/site-packages/tmdbv3api/objs/search.py", line 51, in movies
return self._get_obj(self._call(self._urls["movies"], urlencode(params)))
File "/usr/lib/python3.9/site-packages/tmdbv3api/tmdb.py", line 144, in _call
req = self.cached_request(method, url, data, self)
File "/usr/lib/python3.9/site-packages/tmdbv3api/tmdb.py", line 124, in cached_request
return requests.request(method, url, data=data, proxies=self.proxies)
File "/usr/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 416, in connect
self.sock = ssl_wrap_socket(
File "/usr/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/usr/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.themoviedb.org', port=443): Max retries exceeded with url: /3/search/movie?api_key=xxxx&query=%E5%A4%B1%E8%B8%AA%E9%A1%BA%E5%BA%8F&year=2014&page=1&language=en (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/torcp", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.9/site-packages/torcp/torcp.py", line 965, in main
processOneDirItem(parentLocation, itemName, folderimdb)
File "/usr/lib/python3.9/site-packages/torcp/torcp.py", line 688, in processOneDirItem
p.parse(itemName, useTMDb=(ARGS.tmdb_api_key is not None), hasIMDbId=imdbidstr)
File "/usr/lib/python3.9/site-packages/torcp/tmdbparser.py", line 106, in parse
self.searchTMDb(self.title, self.tmdbcat,
File "/usr/lib/python3.9/site-packages/torcp/tmdbparser.py", line 369, in searchTMDb
results = search.movies({"query": s[1], "year": str(intyear), "page": 1})
File "/usr/lib/python3.9/site-packages/tmdbv3api/objs/search.py", line 51, in movies
return self._get_obj(self._call(self._urls["movies"], urlencode(params)))
File "/usr/lib/python3.9/site-packages/tmdbv3api/tmdb.py", line 144, in _call
req = self.cached_request(method, url, data, self)
File "/usr/lib/python3.9/site-packages/tmdbv3api/tmdb.py", line 124, in cached_request
return requests.request(method, url, data=data, proxies=self.proxies)
File "/usr/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.themoviedb.org', port=443): Max retries exceeded with url: /3/search/movie?api_key=xxxx&query=%E5%A4%B1%E8%B8%AA%E9%A1%BA%E5%BA%8F&year=2014&page=1&language=en (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))
网络环境:旁路由openclash,访问外网没有什么明显问题,规则指定了“api.themoviedb.org”走代理,观察日志也的确走了代理。
本地环境:docker安装快检版qb4.3.9,根据教程在容器内安装pip3后pip3 install torcp,依赖包版本:
Package Version
------------------ ---------
appdirs 1.4.4
CacheControl 0.12.10
certifi 2020.12.5
charset-normalizer 2.0.7
colorama 0.4.4
contextlib2 21.6.0
distlib 0.3.3
distro 1.6.0
html5lib 1.1
idna 3.3
lockfile 0.12.2
msgpack 1.0.2
ordered-set 4.0.2
packaging 20.9
pep517 0.12.0
pip 20.3.4
progress 1.6
pyparsing 2.4.7
requests 2.26.0
retrying 1.3.3
setuptools 52.0.0
six 1.16.0
tmdbv3api 1.7.7
toml 0.10.2
tomli 1.2.2
torcp 0.52
urllib3 1.26.7
webencodings 0.5.1
刮削基本上看脸,多的时候能刮7-80部,少的时候只能刮十来部,但问题是库里还有几百部电影。
如果按照根目录的方式转移每次都要从头开始,而如果按照子目录的话还要一个个搞或者写脚本,有点麻烦。
现在就想知道这是我本地网络的问题,还是工具的问题,以及有什么好的解决办法。