Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update util.go #3652

Merged
merged 1 commit into from
Feb 28, 2023
Merged

Update util.go #3652

merged 1 commit into from
Feb 28, 2023

Conversation

Admirepowered
Copy link
Contributor

User-Agent to netdisk and remove origin=dlna(is baned)

User-Agent to netdisk and remove origin=dlna(is baned)
@welcome
Copy link

welcome bot commented Feb 27, 2023

Thanks for opening this pull request! Please check out our contributing guidelines.

@xhofe xhofe merged commit 53a1c42 into AlistGo:main Feb 28, 2023
@welcome
Copy link

welcome bot commented Feb 28, 2023

Congrats on merging your first pull request! We here at behavior bot are proud of you!

@anwen-anyi
Copy link
Contributor

🤔 这样的话百度有什么不一样的地方嘛~

@Admirepowered
Copy link
Contributor Author

🤔 这样的话百度有什么不一样的地方嘛~

去掉orange=dlna后以后需要下载时候带上Range头,不然会403,我这还有其他方法,但是百度的官方提供的Api接口无法实现,只有用百度的用户Api才能下载

@anwen-anyi
Copy link
Contributor

喔看 UA哪里也改了
这样的话如果使用官方API接口 然后浏览器修改UA头 为 pan.baidu.com 不受影响能正常使用呢吧还?

@Admirepowered
Copy link
Contributor Author

喔看 UA哪里也改了 这样的话如果使用官方API接口 然后浏览器修改UA头 为 pan.baidu.com 不受影响能正常使用呢吧还?

小文件是没有影响,但是大文件需要改为百度网盘的这个netdisk。

@anwen-anyi
Copy link
Contributor

大文件需要改成 netdisk 还是 pan.baidu.com

@Admirepowered
Copy link
Contributor Author

大文件需要改成 netdisk 还是 pan.baidu.com
百度网盘的ua是netdisk,理论上所有的ua都应该是netdisk,官方客户端下载请求的是 netdisk;P2SP;3.0.0.64;字段,那个pan.baidu.com只是百度官方的示例,非netdisk会默认识别为浏览器下载,这次和谐主要是和谐了浏览器直接下载的

@anwen-anyi
Copy link
Contributor

anwen-anyi commented Feb 28, 2023

呜呜呜...好不容易培养的用户习惯 (我倒是转变很快) 哈哈哈
等action build好了我看看有啥不同~

@xhofe
Copy link
Collaborator

xhofe commented Feb 28, 2023

使用 官方 API 还是 pan.baidu.com, 文档中写的:https://pan.baidu.com/union/doc/pkuo3snyp

使用dlink时,必须在请求header中设置User-Agent字段为pan.baidu.com

@anwen-anyi
Copy link
Contributor

anwen-anyi commented Feb 28, 2023

刚试了下 UA头改成 User-Agent: netdisk 就无法在线观看了,也无法下载似乎?
img

就算我 把UA改成了 pan.baidu.com 疯狂被IDM接管下载
但是我在IDM内没有勾选让浏览器接管下载,浏览器内无法观看了QAQ......

之前的时候 pan.baidu.com 倒是没问题,能在线观看~下载也不受影响...

@Admirepowered
Copy link
Contributor Author

刚试了下 UA头改成 User-Agent: netdisk 就无法在线观看了,也无法下载似乎? img

就算我 把UA改成了 pan.baidu.com 疯狂被IDM接管下载 但是我在IDM内没有勾选让浏览器接管下载,浏览器内无法观看了QAQ......

之前的时候 pan.baidu.com 倒是没问题,能在线观看~下载也不受影响...

image
如果你的账号没有限制 理论上应该是返回200 OK的

@anwen-anyi
Copy link
Contributor

emmm 我用的官方API,是不是得改成非官方? 改成非官方就可以了

@Admirepowered
Copy link
Contributor Author

emmm 我用的官方API,是不是得改成非官方? 改成非官方就可以了

官方的api我没有改动啊,我以为能用就没管

@anwen-anyi
Copy link
Contributor

嗯呐,我排查下哪里的锅吧QAQ,头一次遇到这样的情况我回头试试看什么鬼。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants