peterding / alipcs-py Goto Github PK
View Code? Open in Web Editor NEWAliyundrive API & App 阿里云盘 API 和 客户端
License: MIT License
Aliyundrive API & App 阿里云盘 API 和 客户端
License: MIT License
(v0.3.2) System ERROR: 'AccountManager' object has no attribute 'userdel'
app\app.py | 481 行 am.userdel(user_id)
app\account.py | 191 行 def delete_account(self, user_id: str):
(v0.5.0) ERROR: AliPCSError: error_code: InvalidParameter.ClientId, response: {'code': 'InvalidParameter.ClientId',
'message': 'The input parameter client_id is not valid. ', 'requestId': None}
AliPCS-Py u --upload-type One ./* /网上分享/游戏
如果文件能秒传到阿里云盘是没问题的,但如果是文件非秒传则会出现错误(文件大小不对)
例如我有一个文件大小为1~3G,那么最终上传到阿里云盘的只有30M...
有没有解决限流问题的方案,目前实测每个save操作基本都得等待10分钟以上,这个时长很难受,用脚本吧时间严重失控还没有用手工转存快。。。。不用吧手工天天转存也不是事。。。。有点尴尬现在。。。包括ls等操作也是频繁限流无法正常使用。。。
不知道是只有我的账号有这种情况吗?还是大家都是这种情况?谢谢。
命令格式: AliPCS-Py -u $account save --file-id $fileid $shareid "$destdir"
debug信息:
(v0.5.1) ERROR: AliPCSError: error_code: ParamFlowException, response: {'code': 'ParamFlowException', 'message': '9018034bec07433ab4c044ae06777f51',
'requestId': '0a0070ab16772838952492859e16b3', 'resultCode': 'ParamFlowException'}
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/app/app.py:114 in wrap │
│ │
│ 111 │ @wraps(func) │
│ 112 │ def wrap(*args, **kwargs): │
│ 113 │ │ try: │
│ ❱ 114 │ │ │ return func(*args, **kwargs) │
│ 115 │ │ except AliPCSError as err: │
│ 116 │ │ │ _exit_progress_bar() │
│ 117 │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/app/app.py:194 in wrap │
│ │
│ 191 │ │ │ │ f"user_id: [b]{user_id}[/b]" │
│ 192 │ │ │ ) │
│ 193 │ │ │ _change_account(ctx, user_id) │
│ ❱ 194 │ │ │ func(*args, **kwargs) │
│ 195 │ │ │ print() │
│ 196 │ │
│ 197 │ return wrap │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/app/app.py:1391 in save │
│ │
│ 1388 │ else: │
│ 1389 │ │ share_id = share_url_or_id │
│ 1390 │ │
│ ❱ 1391 │ _share.save_shared( │
│ 1392 │ │ api, │
│ 1393 │ │ remotedir, │
│ 1394 │ │ share_id=share_id, │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/commands/share.py:163 in save_shared │
│ │
│ 160 │ if share_url: │
│ 161 │ │ save_shared_by_url(api, remotedir, share_url, password=password) │
│ 162 │ else: │
│ ❱ 163 │ │ save_shared_by_file_ids(api, remotedir, share_id, file_ids, password=password) │
│ 164 │
│ 165 │
│ 166 def list_shared_files( │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/commands/share.py:118 in │
│ save_shared_by_file_ids │
│ │
│ 115 │ │ │ dest_pcs_files[rd] = api.makedir_path(rd) │
│ 116 │ │ dest_pcs_file = dest_pcs_files[rd] │
│ 117 │ │ │
│ ❱ 118 │ │ if not shared_file.is_root() and not remotepath_exists( │
│ 119 │ │ │ api, shared_file.name, rd │
│ 120 │ │ ): │
│ 121 │ │ │ api.transfer_shared_files( │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/commands/share.py:236 in │
│ remotepath_exists │
│ │
│ 233 ) -> bool: │
│ 234 │ names = _cache.get(rd) │
│ 235 │ if not names: │
│ ❱ 236 │ │ names = set([sp.name for sp in api.list_path_iter(rd)]) │
│ 237 │ │ _cache[rd] = names │
│ 238 │ return name in names │
│ 239 │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/commands/share.py:236 in │
│ │
│ 233 ) -> bool: │
│ 234 │ names = _cache.get(rd) │
│ 235 │ if not names: │
│ ❱ 236 │ │ names = set([sp.name for sp in api.list_path_iter(rd)]) │
│ 237 │ │ _cache[rd] = names │
│ 238 │ return name in names │
│ 239 │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/alipcs/api.py:296 in list_path_iter │
│ │
│ 293 │ │ │
│ 294 │ │ dirname = posix_path_dirname(remotepath) │
│ 295 │ │ │
│ ❱ 296 │ │ for p in self.list_iter( │
│ 297 │ │ │ file_id, │
│ 298 │ │ │ share_id=share_id, │
│ 299 │ │ │ desc=desc, │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/alipcs/api.py:216 in list_iter │
│ │
│ 213 │ │ pcs_file = self.meta(file_id, share_id=share_id)[0] │
│ 214 │ │ dirname = pcs_file.name │
│ 215 │ │ while True: │
│ ❱ 216 │ │ │ pcs_files, next_marker = self.list( │
│ 217 │ │ │ │ file_id, │
│ 218 │ │ │ │ share_id=share_id, │
│ 219 │ │ │ │ desc=desc, │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/alipcs/api.py:178 in list │
│ │
│ 175 │ │ more, using the returned next_marker
parameter for next list
call. │
│ 176 │ │ """ │
│ 177 │ │ │
│ ❱ 178 │ │ info = self._alipcs.list( │
│ 179 │ │ │ file_id=file_id, │
│ 180 │ │ │ share_id=share_id, │
│ 181 │ │ │ desc=desc, │
│ │
│ /usr/local/python3/lib/python3.8/site-packages/alipcs_py/alipcs/errors.py:27 in check │
│ │
│ 24 │ │ │
│ 25 │ │ if error_code: │
│ 26 │ │ │ err = parse_error(error_code, str(info)) │
│ ❱ 27 │ │ │ raise err │
│ 28 │ │ │
│ 29 │ │ return info │
│ 30 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AliPCSError: error_code: ParamFlowException, response: {'code': 'ParamFlowException', 'message': '9018034bec07433ab4c044ae06777f51', 'requestId':
'0a0070ab16772838952492859e16b3', 'resultCode': 'ParamFlowException'}
测试脚本test.sh
[root@centos update]# cat test.sh
shareurl=https://www.aliyundrive.com/s/NBaNPzCpWBy/folder/6437e757bdd36acee0f443538006e1737b0af1f6
/usr/local/python3/bin/AliPCS-Py ls --ID -f --share-url "$shareurl"|grep -E "mp4|mkv"
这样一个脚本,直接执行输出结果没问题,但是放到nohup或者crontab执行,fileid就少2个字符。
由于在python311中,longinterpr.h被并入Python.h(详见这里),在windows上安装时提示错误
应该是httptools的问题
不想退回低版本
请问大佬如何解决:rose:
copying httptools\parser\parser.c -> build\lib.win-amd64-cpython-311\httptools\parser
copying httptools\parser\url_parser.c -> build\lib.win-amd64-cpython-311\httptools\parser
running build_ext
building 'httptools.parser.parser' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\httptools
creating build\temp.win-amd64-cpython-311\Release\httptools\parser
creating build\temp.win-amd64-cpython-311\Release\vendor
creating build\temp.win-amd64-cpython-311\Release\vendor\llhttp
creating build\temp.win-amd64-cpython-311\Release\vendor\llhttp\src
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\xiaoc\AppData\Local\Temp\pip-install-iyyqvb29\httptools_30f95bcdcade4bfc9d39ada1c70bc9bd\vendor\llhttp\include -IC:\Users\xiaoc\AppData\Local\Temp\pip-install-iyyqvb29\httptools_30f95bcdcade4bfc9d39ada1c70bc9bd\vendor\llhttp\src "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tchttptools/parser/parser.c /Fobuild\temp.win-amd64-cpython-311\Release\httptools/parser/parser.obj -O2
parser.c
httptools/parser/parser.c(212): fatal error C1083: 无法打开包括文件: “longintrepr.h”: No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
sdk的 upload_slice 函数的url参数传什么呢?
我只传了网盘路径,却报错,请问完整URL是怎么样的呢
ERROR: Could not find a version that satisfies the requirement AliPCS-Py (from versions: none)
ERROR: No matching distribution found for AliPCS-Py
我想调用aria2c远程下载,但AliPCS-Py ls "nce.mov" --show-dl-link 只显示下载链接,没有user-agent和referer,能不能提供一下
AliPCS-Py ls --ID -f --share-url https://www.aliyundrive.com/s/tuZobrQEK5s
最近这两天,ls share-url突然没有返回结果了,也没有报错信息。
我用阿里云盘的名字作为account_name添加,报错了
AliPCS-Py useradd --refresh-token "xxxx" --account_name abcdef
(v0.5.3) ERROR: AliPCSError: error_code: InvalidParameter.ClientId, response: {'code': 'InvalidParameter.ClientId', 'message': 'The input parameter client_id is not valid. ', 'requestId': None}
default drive id为备份盘,如何设为资源盘?谢谢。
RT
AliPCS-Py download --file-id 6510eb8198b044593b0547e19ff10d5d35b21a3e --share-id NRXc5zUDHdi
(v0.6.1) System ERROR: argument of type 'NoneType' is not iterable
上传 100G 的文件,一直在转圈,转了半个小时了。是在切片吗
应该还有个小bug,偶尔返回的fileid不完整,后面几位是....,导致无法使用,貌似不是必现,有时候重复执行一次就正常了
https://www.aliyundrive.com/s/f67xn4CtCbJ/folder/63f036d572c18ed979cc4b1ea1db41d4683b7428
Originally posted by @acoooder in #7 (comment)
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.