bypy
bypy copied to clipboard
认证成功 下载几M的文件可以 上百M的全都不行
` <E> [23:50:03] Error accessing 'https://d.pcs.baidu.com/rest/2.0/pcs/file' <E> [23:50:03] Function: __downchunks_act <E> [23:50:03] Website parameters: {'method': 'download', 'path': '/apps/bypy/test.exe'} <E> [23:50:03] Full URL: http://www.baidupcs.com/403.html <E> [23:50:03] HTTP Response Status Code: 403 <E> [23:50:03] Error JSON returned:{'error_code': 31326, 'error_msg': 'anti hotlinking'} Error code: 31326 Error Description: anti hotlinking <E> [23:50:03] Website returned: { "error_code":31326, "error_msg":"anti hotlinking" }
<E> [23:50:03] Waiting 10 seconds before retrying... <E> [23:50:13] Request Try #2 / 5 <E> [23:50:14] Error accessing 'https://d.pcs.baidu.com/rest/2.0/pcs/file' <E> [23:50:14] Function: __downchunks_act <E> [23:50:14] Website parameters: {'method': 'download', 'path': '/apps/bypy/test.exe'} <E> [23:50:14] Full URL: https://d.pcs.baidu.com/rest/2.0/pcs/file?method=download&path=%2Fapps%2Fbypy%2Ftest.exe&access_token=21.0e89cbaaa7251c0bef6d202da14f8df1.2592000.1578325665.3581965141-1572671 <E> [23:50:14] HTTP Response Status Code: 403 <E> [23:50:14] Error JSON returned:{'error_code': 31045, 'error_msg': 'user not exists', 'request_id': 7908594938926713917} Error code: 31045 Error Description: user not exists <E> [23:50:14] Website returned: {"error_code":31045,"error_msg":"user not exists","request_id":7908594938926713917} <E> [23:50:14] Waiting 20 seconds before retrying... <E> [23:50:34] Request Try #3 / 5 <E> [23:50:41] Error accessing 'https://d.pcs.baidu.com/rest/2.0/pcs/file' <E> [23:50:41] Function: __downchunks_act <E> [23:50:41] Website parameters: {'method': 'download', 'path': '/apps/bypy/test.exe'} <E> [23:50:41] Full URL: http://www.baidupcs.com/403.html <E> [23:50:41] HTTP Response Status Code: 403 <E> [23:50:41] Error JSON returned:{'error_code': 31326, 'error_msg': 'anti hotlinking'} Error code: 31326 Error Description: anti hotlinking <E> [23:50:41] Website returned: { "error_code":31326, "error_msg":"anti hotlinking" }
<E> [23:50:41] Waiting 30 seconds before retrying... <E> [23:51:11] Request Try #4 / 5 <E> [23:51:12] Error accessing 'https://d.pcs.baidu.com/rest/2.0/pcs/file' <E> [23:51:12] Function: __downchunks_act <E> [23:51:12] Website parameters: {'method': 'download', 'path': '/apps/bypy/test.exe'} <E> [23:51:12] Full URL: https://d.pcs.baidu.com/rest/2.0/pcs/file?method=download&path=%2Fapps%2Fbypy%2Ftest.exe&access_token=21.0e89cbaaa7251c0bef6d202da14f8df1.2592000.1578325665.3581965141-1572671 <E> [23:51:12] HTTP Response Status Code: 403 <E> [23:51:12] Error JSON returned:{'error_code': 31045, 'error_msg': 'user not exists', 'request_id': 7908610776553443099} Error code: 31045 Error Description: user not exists <E> [23:51:12] Website returned: {"error_code":31045,"error_msg":"user not exists","request_id":7908610776553443099} <E> [23:51:12] Waiting 40 seconds before retrying... <E> [23:51:52] Request Try #5 / 5 <E> [23:51:52] Error accessing 'https://d.pcs.baidu.com/rest/2.0/pcs/file' <E> [23:51:52] Function: __downchunks_act <E> [23:51:52] Website parameters: {'method': 'download', 'path': '/apps/bypy/test.exe'} <E> [23:51:52] Full URL: https://d.pcs.baidu.com/rest/2.0/pcs/file?method=download&path=%2Fapps%2Fbypy%2Ftest.exe&access_token=21.0e89cbaaa7251c0bef6d202da14f8df1.2592000.1578325665.3581965141-1572671 <E> [23:51:52] HTTP Response Status Code: 403 <E> [23:51:52] Error JSON returned:{'error_code': 31045, 'error_msg': 'user not exists', 'request_id': 7908621514045115789} Error code: 31045 Error Description: user not exists <E> [23:51:52] Website returned: {"error_code":31045,"error_msg":"user not exists","request_id":7908621514045115789} <E> [23:51:52] Maximum number (5) of tries failed. <E> [23:51:52] ---------------------------------------------------------------- Error 140: Maximum retries reached `
类似,我下载10G的远古番剧,一集50m左右,今早发现进度停止了,一看满屏幕的try <E> [01:38:50] Waiting 10 seconds before retrying... <E> [01:39:00] Request Try #2 / 5 <E> [01:39:01] Waiting 20 seconds before retrying... <E> [01:39:21] Request Try #3 / 5 <E> [01:39:22] Waiting 30 seconds before retrying... <E> [01:39:52] Request Try #4 / 5 <E> [01:39:53] Waiting 40 seconds before retrying... <E> [01:40:33] Request Try #5 / 5 <E> [01:40:33] Maximum number (5) of tries failed. <E> [01:40:35] Waiting 10 seconds before retrying... <E> [01:40:45] Request Try #2 / 5 <E> [01:40:46] Waiting 20 seconds before retrying... <E> [01:41:06] Request Try #3 / 5 <E> [01:41:07] Waiting 30 seconds before retrying... <E> [01:41:37] Request Try #4 / 5 <E> [01:41:38] Waiting 40 seconds before retrying... <E> [01:42:18] Request Try #5 / 5 <E> [01:42:19] Maximum number (5) of tries failed. <E> [01:42:20] Waiting 10 seconds before retrying... <E> [01:42:30] Request Try #2 / 5 <E> [01:42:31] Waiting 20 seconds before retrying... <E> [01:42:51] Request Try #3 / 5 <E> [01:42:52] Waiting 30 seconds before retrying... <E> [01:43:22] Request Try #4 / 5 <E> [01:43:23] Waiting 40 seconds before retrying... <E> [01:44:03] Request Try #5 / 5 <E> [01:44:07] Maximum number (5) of tries failed. <E> [01:44:08] Waiting 10 seconds before retrying... <E> [01:44:18] Request Try #2 / 5 <E> [01:44:19] Waiting 20 seconds before retrying... <E> [01:44:39] Request Try #3 / 5 <E> [01:44:40] Waiting 30 seconds before retrying... <E> [01:45:10] Request Try #4 / 5 <E> [01:45:11] Waiting 40 seconds before retrying... <E> [01:45:51] Request Try #5 / 5 <E> [01:45:53] Maximum number (5) of tries failed. <E> [01:45:54] Waiting 10 seconds before retrying... <E> [01:46:04] Request Try #2 / 5 <E> [01:46:05] Waiting 20 seconds before retrying... <E> [01:46:25] Request Try #3 / 5 <E> [01:46:26] Waiting 30 seconds before retrying... <E> [01:46:56] Request Try #4 / 5 <E> [01:46:57] Waiting 40 seconds before retrying...
感觉是百度云限制了,现在都用不了了
应该是文件大小大于50M的原因。浏览器插件可以通过设置app_id为778750来解决。我尝试在bypy.py里发请求时带上app_id,但还是不行。相同的地址和get参数在浏览器里可以直接下载(会302到真实的地址开始下载),在bypy里就是Error code: 31326。可能是cookie或下载方式不同的原因?