peterding / baidupcs-py Goto Github PK
View Code? Open in Web Editor NEWBaiduPCS API & App 百度网盘客户端 和 API
License: MIT License
BaiduPCS API & App 百度网盘客户端 和 API
License: MIT License
已经升级最新版本,save 还是会出现报错情况
(v0.6.11) ERROR: BaiduPCSError: error_code: 105, message: 啊哦,链接错误没找到文件,请打开正确的分享链接
BaiduPCS-Py save -p nefb https://pan.baidu.com/s/1CrpqjwIgqUVT_bBCV0aWXw /
感谢大佬分享这么给力的工具,辛苦。
我在用保存共享链接的时候遇到错误:
BaiduPCS-Py save -p s9vd https://pan.baidu.com/s/1adS0qazDDcDjx7NP_HNLJQ / ERROR: BaiduPCSError: BaiduPCS._request
尝试了几个链接都有这问题,谢谢
我按照大佬的方法进行配置,开始正常运行了一段时间。之后就开始出错。
主要表现为上传文件显示检测文件已存在,列出文件列表提示出现错误(v0.6.8) System ERROR: 'list'。
pip安装后,BaiduPCS-Py --help
Traceback (most recent call last):
File "c:\programdata\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\programdata\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\Scripts\BaiduPCS-Py.exe\__main__.py", line 4, in <module>
File "c:\programdata\anaconda3\lib\site-packages\baidupcs_py\app\__init__.py", line 2, in <module>
from baidupcs_py.app.app import app as _app
File "c:\programdata\anaconda3\lib\site-packages\baidupcs_py\app\app.py", line 49, in <module>
from baidupcs_py.commands.server import start_server
File "c:\programdata\anaconda3\lib\site-packages\baidupcs_py\commands\server.py", line 32, in <module>
_html_tempt: Template = Template((Path(__file__).parent / "index.html").open().read())
UnicodeDecodeError: 'gbk' codec can't decode byte 0x94 in position 16484: illegal multibyte sequence
WARNNING: Please to search the similar bugs, before you report a bug. Don't report a similar bug which existed.
注意:在你提交一份报告前,请先搜索是否存在类似的报告。请勿重复提交内容相同的报告。
Prerequisites / 报告前提
Before you report a bug, please let the bug to be reproduced at the latest verion of BaiduPCS-Py.
在你提交报告前,请在 BaiduPCS-Py 的最新版本上复现问题。
At sometimes, there are errors occured by an expired cookie. Before you commit the report, please to check whether cookies are expired.
有时一些错误是由于某个 cookie 超期导致的。在你提交报告前,请先检查你的 cookies 是否超期。
Describe the bug / 描述 bug
A clear and concise description of what the bug is.
请清楚的描述你遇到的问题。
To Reproduce / 复现问题
Steps to reproduce the behavior:
按照下面的步骤可以复现问题:
Screenshots / 问题截图
If applicable, add screenshots to help explain your problem.
如果可能,请附加问题截图。
不要出现
BDUSS
和cookies
。
Envrionment / 运行环境
Runing log / 运行日志
Please follow steps to paste the content of file ~/.baidupcs-py/running.log
.
~/.baidupcs-py/running.log
if it exists.LOG_LEVEL=DEBUG
.LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
after the bug occurs.Don't show
BDUSS
andcookies
.
请按照下面的步骤贴出运行日志 ~/.baidupcs-py/running.log
中的内容。
~/.baidupcs-py/running.log
,如果存在。LOG_LEVEL=DEBUG
。LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
中的内容。不要出现
BDUSS
和cookies
。
Additional context / 补充内容
Add any other context about the problem here.
在这里增加补充内容。
ERROR: Failed building wheel for BaiduPCS-Py
Running setup.py clean for BaiduPCS-Py
Failed to build BaiduPCS-Py
Building wheels for collected packages: aget, mugen
Building wheel for aget (setup.py) ... done
Created wheel for aget: filename=aget-0.1.17-cp38-none-any.whl size=9379 sha256=353e3318496a52f508ceb1c82c7f12c975c040ae9a28368d6f04b1547edcd5eb
Stored in directory: /Users/wangbingquan/Library/Caches/pip/wheels/fd/c4/7f/833a8a4dc042055d182d84010df7f7ae270191ff1e490fcdbd
Building wheel for mugen (setup.py) ... done
Created wheel for mugen: filename=mugen-0.4.4-cp38-none-any.whl size=17426 sha256=a165194ce487380d3703b34789aabd22ae786c2fac9903d23ec470a82c7cf4d7
Stored in directory: /Users/wangbingquan/Library/Caches/pip/wheels/f0/48/db/51480b9b463c782997e781d130edb1fa8993d4be0b0d4eb575
Successfully built aget mugen
ERROR: Could not build wheels for BaiduPCS-Py which use PEP 517 and cannot be installed directly
Describe the bug / 描述 bug
同一个文件,用 自带的 me 下载器是可以下载的,历时10分钟。但是使用 aria2 就出错了。
To Reproduce / 复现问题
Steps to reproduce the behavior:
Screenshots / 问题截图
Download: /Clash.for.Windows.Setup.0.9.5.exe to /dev/shm/baidu_download/Clash.for.Windows.Setup.0.9.5.exe
03/17 18:50:09 [NOTICE] Downloading 1 item(s)
03/17 18:50:09 [ERROR] CUID#7 - Download aborted. URI=http: 。。。。
Exception: [AbstractCommand.cc:351] errorCode=22 URI=http:。。。。
-> [HttpSkipResponseCommand.cc:239] errorCode=22 The response status is not successful. status=403
03/17 18:50:09 [NOTICE] Download GID#02c69835d4f0b49e not complete: /dev/shm/baidu_download/Clash.for.Windows.Setup.0.9.5.exe.tmp
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
02c698|ERR | 0B/s|/dev/shm/baidu_download/Clash.for.Windows.Setup.0.9.5.exe.tmp
Status Legend:
(ERR):error occurred.
aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.
aria2c fails. return code: 22
Envrionment / 运行环境
请按照下面的步骤贴出运行日志 ~/.baidupcs-py/running.log
中的内容。
`
from baidupcs_py.baidupcs import BaiduPCSApi
api = BaiduPCSApi(bduss=bduss, cookies=cookies)
print(api.share('/997.zip'))
`
/usr/local/lib/python3.7/dist-packages/baidupcs_py/baidupcs/errors.py in check(*args, **kwargs)
148
149 if err:
--> 150 raise err
151 return info
152
BaiduPCSError: error_code: -6, message: 请重新登录
已经确定cookie中有STOKEN 值
在上传成功后,进行分享,但是会出现‘请重新登录’提示
已经排除了我本地网络环境的问题 开启server 后 用chrome 浏览器 下载 最大下载速度只能达到 3m/s 我是部署在本机用localhost访问,我们本地正常下载速度10m/s以上
另外我已经开通了vip 下载速度可以达到8m/s以上
As the title says , when I downloading.
我利用大佬的api开发了一下百度网盘隐藏空间的功能,理论上只是多了一步二级密码的解锁,获取到一个SBOXTKN
的cookie,通过这个cookie可以访问隐藏空间,我尝试利用pcs的目录接口发现没有权限打开隐藏空间,只能通过https://pan.baidu.com/api/list 这个接口实现。
这是我的demo
https://github.com/nvv5/BaiduSafeBox
实现了简单的隐藏空间文件展示,希望大佬能集成到你的项目里。
download.download_dir(self.api,
latest_file.path,
download_path,
recursive=True)
遇到一个需求,需要再将某个百度链接转存完以后做一些逻辑,当前的api 没有提供回调函数,或者同步的版本,可以麻烦作者提供一个相关的api吗?或者有没有什么好的解决的方法呢?
你好,项目中列出其他用户分享链接中的文件功能是不是不可用?能更新一下吗?
baidupcs-go可以实现空格或者特殊符号的分享,用通配符‘’,大佬可以加上吗?
种子资源是否支持离线下载?
Describe the bug / 描述 bug
添加某用户后,BaiduPCS-Py userlist
输出 AttributeError: 'NoneType' object has no attribute 'startswith'
,其余用户管理指令(userdel
、su
)也无法使用
To Reproduce / 复现问题
Screenshots / 问题截图
N/A
Envrionment / 运行环境
Runing log / 运行日志
2021-03-19 01:13:15,178 | DEBUG | app: `app`: System Error: Traceback (most recent call last):
File "/home/alex/miniconda3/lib/python3.8/site-packages/baidupcs_py/app/app.py", line 101, in wrap
return func(*args, **kwargs)
File "/home/alex/miniconda3/lib/python3.8/site-packages/baidupcs_py/app/app.py", line 427, in userlist
display_user_infos(*ls, recent_user_id=am._who)
File "/home/alex/miniconda3/lib/python3.8/site-packages/baidupcs_py/commands/display.py", line 408, in display_user_infos
if p.name.startswith("svip2_nd"):
AttributeError: 'NoneType' object has no attribute 'startswith'
Additional context / 补充内容
在 baidupcs_py/commands/display.py
中 display_user_infos
BaiduPCS-Py/baidupcs_py/commands/display.py
Lines 405 to 413 in 6fe1f21
>>> print(products)
[
PcsUserProduct(name='offlinedl_permanent', start_time=1613264983, end_time=2147483648),
PcsUserProduct(name=None, start_time=1615737599, end_time=1616342399),
PcsUserProduct(name='svip2_nd', start_time=1615737599, end_time=1626278399),
PcsUserProduct(name='contentvip_nd', start_time=1615737599, end_time=1626278399)
]
应该是第二项导致出错,临时解决方案是在407行插入
if p.name is None:
continue
(Baiduyun) ➜ test BaiduPCS-Py download ./1 -R -o ./ --no-decrypt
(v0.5.1) System ERROR: AutoDecryptRequest - Server does not support `Range` head
⠦ 1/图包.part1.rar.tmp ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0% • 0/100 bytes • ? • -:--:--
(Baiduyun) ➜ samples BaiduPCS-Py ul
Index Recent User Id User Name Quota SVIP VIP pwd
────────────────────────────────────────────────────────────────────────────
1 ✔ 3225735228 Mh00mg3 461.3 GB/6 TB ✔ ✔ /
DEBUG=1 BaiduPCS-Py save -p nefb https://pan.baidu.com/s/1CrpqjwIgqUVT_bBCV0aWXw /
(v0.6.9) System ERROR:
System ERROR 系统信息没有任何输出内容,辛苦解答
ERROR: Failed building wheel for baidupcs-py
ERROR: Could not build wheels for baidupcs-py which use PEP 517 and cannot be installed directly
Windows10 64位系统
python3.8
pip21.0.1
Windows折腾很久无法安装,非常难受
首先感谢你们的代码,让我可以实现网盘文件同步功能。
Prerequisites / 报告前提
按照readme所给出的使用方法我进行操作。
Describe the bug / 描述 bug
在使用的过程中,成功的添加用户并能进行目录操作,但当我尝试使用 “BaiduPCS-Py download wordcount_v2.xlsx” 指令下载云盘文件时出现了权限错误问题:PermissionError: [WinError 32],详细内容内容如下
To Reproduce / 复现问题
1.添加用户,且使用 “BaiduPCS-Py who” 可以查看到正确的用户
2. 通过目录操作进入需要下载的文件目录
3. 使用 ”BaiduPCS-Py download wordcount_v2.xlsx“ 下载“wordcount_v2.xlsx"成功
4. 问题出现:
报错如下:
‘’‘
exception calling callback for <Future at 0x151e400e1d0 state=finished returned NoneType>
Traceback (most recent call last):
File "C:\Users\a8275\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 557, in move
os.rename(src, real_dst)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'wordcount_v2.xlsx.tmp' -> 'wordcount_v2.xlsx'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\a8275\AppData\Local\Programs\Python\Python37\lib\concurrent\futures_base.py", line 324, in _invoke_callbacks
callback(self)
File "c:\users\a8275\desktop\useless thing\computer network\socket\env\lib\site-packages\baidupcs_py\commands\download.py", line 159, in _wrap_done_callback
done_callback(fut)
File "c:\users\a8275\desktop\useless thing\computer network\socket\env\lib\site-packages\baidupcs_py\commands\download.py", line 77, in done_callback
shutil.move(localpath_tmp, localpath)
File "C:\Users\a8275\AppData\Local\Programs\Python\Python37\lib\shutil.py", line 572, in move
os.unlink(src)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'wordcount_v2.xlsx.tmp'
’‘’
错误截图
Envrionment / 运行环境
在windows试了下登录,创建分享,查看文件夹都没问题,但是转存的时候不成功,报 (v0.6.9) System ERROR:
命令类似于:
BaiduPCS-Py save --password mfgq https://pan.baidu.com/s/1ajltWp8Bu0dXU_NE10eC4g /
python 是 3.9.2版本, baidupcs-py是0.6.9
我是SVIP,用百度客户端有15-18M每秒,但是用这个脚本不管是me还是aget_py都只有2M不到,是百度识别出了我不是用客户端限速了?
错误日志(重点就这一句,样子大概不是这样,前面还会跟个BaiduPCS-Py的版本号,但我剪贴板里面被覆盖掉了,反正就是有这一行句子):[Errno 25] Inappropriate ioctl for device
这个问题已经解决了,我发这个issue,只是记录一下,方便后来者解决,如果需要利用BaiduPCS-Py进行Borg备份同步时,在Vorta中怎么也无法同步成功,而在终端里面却可以的问题。
这其实是个通病,用这里的话说,就是BaiduPCS-Py只能在一个终端里面运行,在其他地方是无法运行的(如Vorta的子进程下)。我的实测也是这样的。但是隔壁Rclone却可以运行,所以不知道是软件本身的问题(包括Vorta,不知道Rclone是怎么处理这种情况的),还是语言/库本身的问题。
This would happen if stdout isn't a terminal (e,g,, redirecting to a file or run as a subprocess and its a pipe). There are different terminal types, like physical terminal attached via a serial line, that may not accept that ioctl. But if this is a linux machine and its default terminal emulator, it should work. Just guesses here. – tdelaney Aug 10 '20 at 18:26
https://stackoverflow.com/questions/63345739/ioerror-errno-25-inappropriate-ioctl-for-device
目前的解决方法就是在一个终端里面跑BaiduPCS-Py,比如我是在BaiduPCS-Py命令前面加了个Kitty命令(kitty BaiduPCS-Py sync /xxx /xxx
)。这个命令会让BaiduPCS-Py在Kitty这个终端里面运行。这样就可以执行成功了。当然你可以换其他的终端。反正是个 终端就行。
系统环境
search 好像没看到翻页的方法
share 分享可否指定日期 比如7天
例如链接:https://pan.baidu.com/wap/init?surl=OOHZMcm-rUQA4piSgtWBiw 提取码:hmts
列出其他用户分享链接中的文件
BaiduPCS-Py listsharedpaths -p hmts http://pan.baidu.com/wap/init?surl=OOHZMcm-rUQA4piSgtWBiw
(v0.6.20) ERROR: BaiduPCSError: error_code: 105, message: 啊哦,链接错误没找到文件,请打开正确的分享链接
保存其他用户分享的链接
BaiduPCS-Py save -p hmts http://pan.baidu.com/wap/init?surl=OOHZMcm-rUQA4piSgtWBiw /
(v0.6.20) ERROR: BaiduPCSError: error_code: 105, message: 啊哦,链接错误没找到文件,请打开正确的分享链接
直接用浏览器打开这个分享链接后是手机版页面,输入正确的提取码并提交后跳转到新的网址:
https://pan.baidu.com/s/1OOHZMcm-rUQA4piSgtWBiw?dp-logid=20610200123498120001#list/path=%2F
这时候再用新的网址代替上面命令的WAP版链接就能正常工作:
BaiduPCS-Py listsharedpaths -p hmts https://pan.baidu.com/s/1OOHZMcm-rUQA4piSgtWBiw?dp-logid=20610200123498120001#list/path=%2F
Size Path
──────────────────────────────────────────────────────────────────────────
- 220.4 MB 231147936 /sharelink3378067569-108609370664595/WePE_64_V2.1.exe
- 194 B 194 /微PE工具箱/V2.1.1/WePE_64_V2.1.exe_MD5.txt
不知道有没有计划支持?
baidupcs-py userlist 提示v0.6.17 system error
WARNNING: Please to search the similar bugs, before you report a bug. Don't report a similar bug which existed.
注意:在你提交一份报告前,请先搜索是否存在类似的报告。请勿重复提交内容相同的报告。
Prerequisites / 报告前提
Before you report a bug, please let the bug to be reproduced at the latest verion of BaiduPCS-Py.
在你提交报告前,请在 BaiduPCS-Py 的最新版本上复现问题。
At sometimes, there are errors occured by an expired cookie. Before you commit the report, please to check whether cookies are expired.
有时一些错误是由于某个 cookie 超期导致的。在你提交报告前,请先检查你的 cookies 是否超期。
Describe the bug / 描述 bug
A clear and concise description of what the bug is.
请清楚的描述你遇到的问题。
To Reproduce / 复现问题
Steps to reproduce the behavior:
按照下面的步骤可以复现问题:
Screenshots / 问题截图
If applicable, add screenshots to help explain your problem.
Don't show
BDUSS
andcookies
.
如果可能,请附加问题截图。
不要出现
BDUSS
和cookies
。
Envrionment / 运行环境
Runing log / 运行日志
Please follow steps to paste the content of file ~/.baidupcs-py/running.log
.
~/.baidupcs-py/running.log
if it exists.LOG_LEVEL=DEBUG
.LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
after the bug occurs.Don't show
BDUSS
andcookies
.
请按照下面的步骤贴出运行日志 ~/.baidupcs-py/running.log
中的内容。
~/.baidupcs-py/running.log
,如果存在。LOG_LEVEL=DEBUG
。LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
中的内容。不要出现
BDUSS
和cookies
。
Additional context / 补充内容
Add any other context about the problem here.
在这里增加补充内容。
本来都可以运行的 但是今天发现下载的时候报错: (v0.6.21) System ERROR: AutoDecryptRequest - Request Error
环境: Ubuntu 18.4, IP是在美国 之前都是下的好好的突然不行了
同一个账户我用国内的机器就可以
BaiduPCS-Py save -p "9eiv" --no-show-vcode https://pan.baidu.com/s/1hiAzHZdYZwKXqYrvjhcrBw=3 /xxxx
(v0.5.7) ERROR: BaiduPCSError: error_code: -62, message: 可能需要输入验证码
Describe the bug / 描述 bug
上传中按 Ctrl-C
中断,终端回显功能被关闭,导致终端无法正常使用
To Reproduce / 复现问题
$ stty
speed 38400 baud; line = 0;
-brkint -imaxbel iutf8
$ BaiduPCS-Py u test.mp4 /
⠹ test.mp4 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0% • 0.0/3.5 GB • ? • -:--:--
^c # 按 Ctrl-C 中断上传
$ stty # <- 这几个字并没有在屏幕上显示出来
speed 38400 baud; line = 0;
min = 1; time = 0;
-brkint -imaxbel iutf8
-icanon -echo
-echo
表示终端回显功能被关闭,此时在终端输入任何内容都无法显示,但可以回车执行。如果需要恢复终端回显:
stty echo
Screenshots / 问题截图
N/A
Envrionment / 运行环境
Runing log / 运行日志
2021-03-22 22:18:15,187 | DEBUG | upload: ======== Uploading start ========
-> Size of from_to_list: 0
2021-03-22 22:18:15,190 | DEBUG | upload: ======== Uploading end ========
2021-03-22 22:20:08,960 | DEBUG | upload: ======== Uploading start ========
-> Size of from_to_list: 1
2021-03-22 22:20:09,048 | DEBUG | upload: -> Upload: index: 0, task_id: 0
2021-03-22 22:20:10,704 | DEBUG | upload: `upload`: encrypt_type: EncryptType.No, localpath: test.mp4, remotepath, /test.mp4
2021-03-22 22:20:10,705 | DEBUG | upload: `upload`: encrypt_io_len: 3456805873
2021-03-22 22:20:10,705 | DEBUG | upload: `upload`: rapid_upload starts
2021-03-22 22:20:13,006 | DEBUG | app: `app`: handle_signal: 2
Additional context / 补充内容
N/A
0.6.20 版本
刷新过网页了。。。 输入 co 后(Cook***: 冒号后一直到第一个分号内容 BAIDUID前)
显示
ERROR: BaiduPCSError: error_code: 31045, message: 用户不存在
安装提示错误
Building wheel for BaiduPCS-Py (PEP 517): started
Building wheel for BaiduPCS-Py (PEP 517): finished with status 'error'
Failed to build BaiduPCS-Py
#47 这个问题在我这也出现了。
我的账号是 SVIP4 ,无论用手机官方 App 还是 pc 端都可以满速下载,宽带能跑满 11MB/s ,手机 5G 实测可以跑到 80+MB/s ,因此可推断账号是没有黑号的。
我在 Win10 上运行 BaiduPCS-Py 无论如何都是最多只有 3MB/s,也尝试了提高线程数和减小分块大小,但都没有用。楼上提到换 Linux 可以满速,但我在虚拟机 Linux 中运行 BaiduPCS-Py 实测还是一样。
但上述操作中,Win10 和 Linux 中使用的网络环境和账号都是相同的,因此我在 Win10 和 Linux 中分别测试了 电信 100Mbps 和 移动 300Mbps,但结果都是不超过 3MB/s。看起来似乎和网络没有关系。
我想换个账号试试但我没有其他的 SVIP 账号,但我注意到 github 上的另外一个项目 BaiduPCS-Go 。我在 Win10 和 Linux 上分别运行那个程序,都能达到 10MB/s,只不过有点波动,我只用了 电信 100Mbps 网络测试,如果用更快的网络也许还会超过 10MB/s。
同一个账号,同一个硬件环境,同一个网络环境,但不同的程序,我觉得是 BaiduPCS-Py 的问题(没有批判的意思,这个项目对我帮助很大,所以我才来提 issue 希望能帮助改进)。
我注意到 BaiduPCS-Py 和 BaiduPCS-Go 的登陆方式不一样,前者是使用者自行在网页版获取 BDUSS 和 cookies ;后者是使用者输入账号和密码,程序模拟登陆后获取登录信息。不知道问题是否跟这个有关?
这不是一个bug报告,先感谢大佬的伟大工程。让我们生活方便了很多。
百度网盘群组一直不支持搜索功能,要找个文件非常麻烦。请问有什么办法吗,给点提示谢谢。
我目前是抓包写了个脚本,递归调用接口一层层访问下去,然后在本地创建一样的文件结构,(都是空文件),感觉很低效,群组一有变化又得扫一遍。麻烦大佬看看有没有简单的api。谢谢
错误提示:
Usage: BaiduPCS-Py save [OPTIONS] SHARED_URL REMOTEDIR
Try 'BaiduPCS-Py save --help' for help.
Error: Missing argument 'REMOTEDIR'.
'parentPath' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
您好,Python2版本可以支持下载别人分享的链接,请问目前的版本支持吗?根据介绍,我的理解是下载别人分享的链接就要先保存到远端,再下载?
今天开始所有命令行功能都提示:
(v0.6.23) ERROR: BaiduPCSError: BaiduPCS._request
2021-07-09 18:34:05,155 | DEBUG | app: `app`: BaiduPCSError: Traceback (most recent call last):
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/baidupcs_py/baidupcs/pcs.py", line 195, in _request
resp = self._session.request(
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/baidupcs_py/app/app.py", line 117, in wrap
return func(*args, **kwargs)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/baidupcs_py/app/app.py", line 463, in useradd
account = Account.from_bduss(bduss, cookies=cookies)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/baidupcs_py/app/account.py", line 38, in from_bduss
user = api.user_info()
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/baidupcs_py/baidupcs/api.py", line 500, in user_info
quota = self.quota()
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/baidupcs_py/baidupcs/api.py", line 84, in quota
info = self._baidupcs.quota()
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/baidupcs_py/baidupcs/errors.py", line 136, in check
info = func(*args, **kwargs)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/baidupcs_py/baidupcs/pcs.py", line 223, in quota
resp = self._request(Method.Get, url, params=params)
File "/Users/cinvro/Library/Python/3.8/lib/python/site-packages/baidupcs_py/baidupcs/pcs.py", line 206, in _request
raise BaiduPCSError("BaiduPCS._request", cause=err)
baidupcs_py.baidupcs.errors.BaiduPCSError: BaiduPCS._request
MACOS 无法贴入 Cookie 能否使用解析文件的方式?
还有既然已经贴 Cookie 了 能否从 Cookie 中拆出 bduss?
DEBUG=1 BaiduPCS-Py share 提示DEBUG不是内部或者外部命令
建议增加 BaiduPCS-Py su 1这样的直接切换用户命令
WARNNING: Please to search the similar bugs, before you report a bug. Don't report a similar bug which existed.
注意:在你提交一份报告前,请先搜索是否存在类似的报告。请勿重复提交内容相同的报告。
Prerequisites / 报告前提
Before you report a bug, please let the bug to be reproduced at the latest verion of BaiduPCS-Py.
在你提交报告前,请在 BaiduPCS-Py 的最新版本上复现问题。
At sometimes, there are errors occured by an expired cookie. Before you commit the report, please to check whether cookies are expired.
有时一些错误是由于某个 cookie 超期导致的。在你提交报告前,请先检查你的 cookies 是否超期。
Describe the bug / 描述 bug
A clear and concise description of what the bug is.
请清楚的描述你遇到的问题。
To Reproduce / 复现问题
Steps to reproduce the behavior:
按照下面的步骤可以复现问题:
Screenshots / 问题截图
If applicable, add screenshots to help explain your problem.
Don't show
BDUSS
andcookies
.
如果可能,请附加问题截图。
不要出现
BDUSS
和cookies
。
Envrionment / 运行环境
Runing log / 运行日志
Please follow steps to paste the content of file ~/.baidupcs-py/running.log
.
~/.baidupcs-py/running.log
if it exists.LOG_LEVEL=DEBUG
.LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
after the bug occurs.Don't show
BDUSS
andcookies
.
请按照下面的步骤贴出运行日志 ~/.baidupcs-py/running.log
中的内容。
~/.baidupcs-py/running.log
,如果存在。LOG_LEVEL=DEBUG
。LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
中的内容。不要出现
BDUSS
和cookies
。
Additional context / 补充内容
Add any other context about the problem here.
在这里增加补充内容。
您好,
我在使用 BaiduPCSApi 这个模块时,能否给我一个分片上传文件到baidupan的example。因为这个项目好像没有对这个模块有比较详细的介绍。 因为我在查阅您的分片上传的api时,自己没有太理解。
感谢。
v0.6.4) System ERROR: 'shareid'
WARNNING: Please to search the similar bugs, before you report a bug. Don't report a similar bug which existed.
注意:在你提交一份报告前,请先搜索是否存在类似的报告。请勿重复提交内容相同的报告。
Prerequisites / 报告前提
Before you report a bug, please let the bug to be reproduced at the latest verion of BaiduPCS-Py.
在你提交报告前,请在 BaiduPCS-Py 的最新版本上复现问题。
At sometimes, there are errors occured by an expired cookie. Before you commit the report, please to check whether cookies are expired.
有时一些错误是由于某个 cookie 超期导致的。在你提交报告前,请先检查你的 cookies 是否超期。
Describe the bug / 描述 bug
A clear and concise description of what the bug is.
请清楚的描述你遇到的问题。
To Reproduce / 复现问题
Steps to reproduce the behavior:
按照下面的步骤可以复现问题:
Screenshots / 问题截图
If applicable, add screenshots to help explain your problem.
Don't show
BDUSS
andcookies
.
如果可能,请附加问题截图。
不要出现
BDUSS
和cookies
。
Envrionment / 运行环境
Runing log / 运行日志
Please follow steps to paste the content of file ~/.baidupcs-py/running.log
.
~/.baidupcs-py/running.log
if it exists.LOG_LEVEL=DEBUG
.LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
after the bug occurs.Don't show
BDUSS
andcookies
.
请按照下面的步骤贴出运行日志 ~/.baidupcs-py/running.log
中的内容。
~/.baidupcs-py/running.log
,如果存在。LOG_LEVEL=DEBUG
。LOG_LEVEL=DEBUG BaiduPCS-Py upload /abc /
~/.baidupcs-py/running.log
中的内容。不要出现
BDUSS
和cookies
。
Additional context / 补充内容
Add any other context about the problem here.
在这里增加补充内容。
作者你好!感谢开发这么完善的库。我遇到的问题是在挂美国VPN的时候一切正常,但用德国IP就无法在Python代码里登陆(命令行模式也一样),会出错如下:
Traceback (most recent call last):
File "C:\Users\Bo\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "C:\Users\Bo\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "C:\Users\Bo\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "C:\Users\Bo\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "C:\Users\Bo\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "C:\Users\Bo\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "C:\Users\Bo\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\Bo\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\Users\Bo\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
请问是什么原因呢?已经换过Cookies,浏览器重新登陆等等(浏览器上在哪个IP登陆都没有问题)。非常感谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.