misaka10843 / copymanga-downloader

使用python+copymanga API来下载copymanga(拷贝漫画)中的漫画,支持批量+选话下载和获取您收藏的漫画并下载!(全平台支持)
GNU General Public License v3.0
221 stars 16 forks source link

连接错误 #75

Closed weishijie-detail closed 1 year ago

weishijie-detail commented 1 year ago

描述(Description)

无法连接到服务器,未使用梯子时设置访问的网址时copymanga.tv,但程序错误显示远程服务器强行断开连接,但网页访问copymanga.tv却可以访问。使用梯子时设置访问的网址时copymanga.site,但程序错误显示远程服务器积极拒绝,无法连接,打开梯子时访问copymanga.site无压力。是否时ip问题或者网站自身问题,最近copymanga.tv时不时会出现访问错误现象。

📷 复现步骤(Steps to Reproduce)

📄 [异常/日志]信息([Exception/Log] Information)

E:\anaconda\envs\class_python\python.exe E:/copymanga/copymanga-downloader/main.py 命令行参数中缺少必要字段,将切换到普通模式 您是想搜索还是查看您的收藏?(0:导出收藏,1:搜索,2:收藏,3:添加半自动更新,9:修改设 ) [0/1/2/3/9] (1): 1 您需要搜索什么漫画呢: 1 Traceback (most recent call last): File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\connection.py", line 175, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection raise err File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\connectionpool.py", line 710, in urlopen chunked=chunked, File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn conn.connect() File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\connection.py", line 358, in connect self.sock = conn = self._new_conn() File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\connection.py", line 187, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x000002213A933668>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\anaconda\envs\class_python\lib\site-packages\requests\adapters.py", line 499, in send timeout=timeout, File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\connectionpool.py", line 788, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "E:\anaconda\envs\class_python\lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.copymanga.size', port=443): Max retries exceeded with url: /api/v3/search/comic?format=json&platform=3&q=1&limit=10&offset=0 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002213A933668>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:/copymanga/copymanga-downloader/main.py", line 942, in main() File "E:/copymanga/copymanga-downloader/main.py", line 909, in main welcome() File "E:/copymanga/copymanga-downloader/main.py", line 152, in welcome choice_manga_path_word = search() File "E:/copymanga/copymanga-downloader/main.py", line 371, in search selection = search_list(url, offset, current_page_count) File "E:/copymanga/copymanga-downloader/main.py", line 326, in search_list response = requests.get(url.format(offset), headers=API_HEADER, proxies=PROXIES) File "E:\anaconda\envs\class_python\lib\site-packages\requests\api.py", line 73, in get return request("get", url, params=params, kwargs) File "E:\anaconda\envs\class_python\lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "E:\anaconda\envs\class_python\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "E:\anaconda\envs\class_python\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, kwargs) File "E:\anaconda\envs\class_python\lib\site-packages\requests\adapters.py", line 565, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.copymanga.size', port=443): Max retries exceeded with url: /api/v3/search/comic?format=json&platform=3&q=1&limit=10&offset=0 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002213A933668>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

🚑 基本信息(Basic Information)

image image

weishijie-detail commented 1 year ago

加了proxy参数之后问题解决

misaka10843 commented 1 year ago

中国大陆不支持copymanga的大部分域名,请确保能裸连,如果不能的话不走代理是会报错的