alist-org / alist

🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序,使用 Gin 和 Solidjs。
https://alist.nn.ci
GNU Affero General Public License v3.0
39.44k stars 5.12k forks source link

Pikpakshare API更新了导致FsGet返回的rawURL为空 #6493

Open Rik-F5 opened 1 month ago

Rik-F5 commented 1 month ago

Please make sure of the following things

AList Version / AList 版本

v3.34.0

Driver used / 使用的存储驱动

Pikpak share

Describe the bug / 问题描述

今天pikpak share的API应该是更新了,file_info返回的web_content_link 都是空

下面的代码返回的rawURL也都是空了。。

https://github.com/alist-org/alist/blob/037850bbd5096707c43e05b361b9b154d1a2d183/drivers/pikpak_share/driver.go#L71

{ "share_status": "OK", "share_status_text": "", "file_info": { "kind": "drive#file", "id": "VNoq57I_r3EEaWx1s5bww1-po1", "parent_id": "VNoq57IGr3EEaWx1s5bww1-Co1", "name": "EPORNER.COM - [94DWXsAJNCv] Piper Perri (1080).mp4", "user_id": "ZVtNpD0DPYNwTNNU", "size": "981734630", "revision": "0", "file_extension": ".mp4", "mime_type": "video/mp4", "starred": false, "web_content_link": "", "created_time": "2024-01-23T19:33:13.061+08:00", "modified_time": "2024-01-23T19:33:13.061+08:00", "icon_link": "https://static.mypikpak.com/39998a187e280e2ee9ceb5f58315a1bcc744fa64", "thumbnail_link": "", "md5_checksum": "", "hash": "7D21533582B75DD839AC6437052AB051470D8A85", "links": {}, "phase": "PHASE_TYPE_COMPLETE", "audit": { "status": "STATUS_OK", "message": "Normal resource", "title": "" }, "medias": [

Reproduction / 复现链接

任意piapak share都可以复现

Config / 配置

任意piapak share都可以复现

Logs / 日志

No response

welcome[bot] commented 1 month ago

Thanks for opening your first issue here! Be sure to follow the issue template!

xhtwan commented 1 month ago

距离上一次修复,用了差不多快1年时间了吧,上一次好歹还能播4分钟,这次是彻底不让播了

kiolygenius commented 1 month ago

登陆也需要滑动验证了,可能需要用cookie了。

xixky commented 1 month ago

Pikpak无法登录了

akynazh commented 1 month ago

挂载 Pikpak 显示 captcha_required,应该是不让用了

liya1413 commented 1 month ago

寄了

ICEY1W32 commented 1 month ago

pikpak同报错 来蹲蹲看有没有大佬提供解决方案

Gladiaria commented 1 month ago

在PikPak建一個WebDav的功能後,再掛載就可以了

Quan666 commented 1 month ago

登录出现滑动验证码可以参考我这的处理。 目前观察到的情况是有些账号是不会触发验证码, 出现验证码之后可以让用户手动通过验证拿到 captcha_token 后登录。

https://github.com/Quan666/PikPakAPI/blob/e92473f0db1a08445fe0854dbaf1403f8d524b8a/pikpakapi/__init__.py#L167-L213

foxxorcat commented 1 month ago

没必要那么麻烦,走oauth2.0协议不用验证码。

foxxorcat commented 1 month ago

POST: https://user.mypikpak.com/v1/auth/token Content-Type: application/x-www-form-urlencoded data: client_id=YNxT9w7GMdWvEOKa&client_secret=dbw2OtmVEeuUvIptb1Coyg&grant_type=password&password=&username=

Quan666 commented 1 month ago

没必要那么麻烦,走oauth2.0协议不用验证码。

确实可以,感谢

wekingchen commented 1 month ago

没必要那么麻烦,走oauth2.0协议不用验证码。

请教一下是在哪里设置呀?

kiolygenius commented 1 month ago

新提交的也有问题,

  1. pikpak 分享视频直链返回的是 206 Partial Content, 只会返回一半的数据。
  2. 如果添加两个同账号不同目录的pikpak ,refresh_token 会互相踢
foxxorcat commented 1 month ago
  1. pkpak限制,无解
  2. 后续改进
Rik-F5 commented 1 month ago

206是对的,我抓包看了一下,应该是以下这个问题

用第三方播放的时候,服务器回的这个header X-Oss-Object-Type: Multipart

App给的应该是 X-Oss-Object-Type: Normal

估计是 /downlaod/ 这个form里面的某一个某一项被APP的JS劫持了一下,哪位前端大神追一下,看看server是怎么判断APP和第三方播放器的?

Rik-F5 commented 1 month ago

206是对的,我抓包看了一下,应该是以下这个问题

用第三方播放的时候,服务器回的这个header X-Oss-Object-Type: Multipart

App给的应该是 X-Oss-Object-Type: Normal

估计是 /downlaod/ 这个form里面的某一个某一项被APP的JS劫持了一下,哪位前端大神追一下,看看server是怎么判断APP和第三方播放器的?

我刚刚仔细看了一下,应该是download这个form里面的下面俩个key

pr sign

这两个的值如果直接从web_content_link的返回里面直接引用的话,就会得到X-Oss-Object-Type: Multipart

所以APP的JS应该是把它们重新hash过了

如果我播放一半的时候,把APP里面hash的值再改回原始的,服务器会给我回302, 然后这个location其实已经404了

所以逻辑是这样的:

  1. APP JS hash pr & sign
  2. 服务器 判断如果是没有hash的,返回X-Oss-Object-Type: Multipart
  3. 如果是hash的,返回X-Oss-Object-Type: Normal

蹲一个前端大神看看能不能把function给抠出来

foxxorcat commented 1 month ago

206是对的,我抓包看了一下,应该是以下这个问题 用第三方播放的时候,服务器回的这个header X-Oss-Object-Type: Multipart App给的应该是 X-Oss-Object-Type: Normal 估计是 /downlaod/ 这个form里面的某一个某一项被APP的JS劫持了一下,哪位前端大神追一下,看看server是怎么判断APP和第三方播放器的?

我刚刚仔细看了一下,应该是download这个form里面的下面俩个key

pr sign

这两个的值如果直接从web_content_link的返回里面直接引用的话,就会得到X-Oss-Object-Type: Multipart

所以APP的JS应该是把它们重新hash过了

如果我播放一半的时候,把APP里面hash的值再改回原始的,服务器会给我回302, 然后这个location其实已经404了

所以逻辑是这样的:

1. APP JS hash pr & sign

2. 服务器 判断如果是没有hash的,返回X-Oss-Object-Type: Multipart

3. 如果是hash的,返回X-Oss-Object-Type: Normal

蹲一个前端大神看看能不能把function给抠出来

pr sign 这两个是服务器签发的,秘钥算法都在服务器那边

ypq123456789 commented 1 month ago

所以现在就是pp分享挂载只能看视频的前一半是吗

tota666 commented 1 month ago

所以现在就是pp分享载只能看视频首页吗

一半都看不了,又凉了!现在是服务端加密,很难破解

seertenedos commented 1 month ago

Could it be worked around but having the code add the file to your account, get the download url of the file in the users account and then deleting it? Not as good as a direct download but maybe it could work?

机器翻译,抱歉翻译得不好 能不能用代码将文件添加到您的账户中,在用户账户中获取文件的下载网址,然后将其删除?虽然没有直接下载那么好,但也许可以行得通?

tota666 commented 1 month ago

Could it be worked around but having the code add the file to your account, get the download url of the file in the users account and then deleting it? Not as good as a direct download but maybe it could work?

机器翻译,抱歉翻译得不好 能不能用代码将文件添加到您的账户中,在用户账户中获取文件的下载网址,然后将其删除?虽然没有直接下载那么好,但也许可以行得通?

免费账号只有6个G空间,大文件会爆仓的

seertenedos commented 1 month ago

while that is true for free accounts it is not for paid. Both free and paid are currently effected by this. Also i am suggesting adding just the file not all files so on a free account it would work for files of less than 6gb which is better than nothing. The code should auto delete after the download link is generated so the file should not take space after the link is generated. Not 100% sure this will not kill the link right away but i suspect the link would still be valid for a period of time.

虽然免费账户是这样,但付费账户并非如此。免费和付费账户目前都受此影响。另外,我建议只添加文件,而不是所有文件,因此在免费账户中,文件小于 6GB 就可以使用,这总比什么都不添加要好。代码应在生成下载链接后自动删除,因此生成链接后文件不应占用空间。我不能百分百确定这样做不会立即删除链接,但我猜测链接在一段时间内仍然有效。