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

只能下载480P视频 #79

Closed
l91liliang opened this issue Dec 20, 2022 · 5 comments
Closed

只能下载480P视频 #79

l91liliang opened this issue Dec 20, 2022 · 5 comments

Comments

@l91liliang
Copy link

初步判断是因为未登录用户在b站只能看480P视频的缘故。

@HFrost0
Copy link
Owner

HFrost0 commented Dec 20, 2022

目前bv视频需要带cookie才行 #62

@l91liliang
Copy link
Author

目前bv视频需要带cookie才行 #62

添加了cookie后,使用macOS 的VScode运行会报错,相关说明可见附加md文件。恳请帮忙解决,多谢🙏
报错代码及信息.md

@HFrost0
Copy link
Owner

HFrost0 commented Dec 20, 2022

如果你使用python中的模版字符串""" """来包含cookie,那你要确保其中没有加入额外的回车,因为模版字符串会包含其中的所有字符

cookie = """
xxxxxxxxxxxxxxxxxxxxxxxx
"""

是一种错误的写法,因为开头和结尾均包含了额外的回车,所以发生了错误。如果你一定要使用模版字符串,正确的写法应该是

cookie = """xxxxxxxxxxxxxxxxxxxxxxxx"""

不过,还是使用""吧,这个属于python基础语法的问题了

@HFrost0
Copy link
Owner

HFrost0 commented Dec 20, 2022

订正一下,好像三引号不叫模版字符串,懂意思就行

@l91liliang
Copy link
Author

完美解决,膜拜大佬。

@HFrost0 HFrost0 closed this as completed Dec 21, 2022
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

No branches or pull requests

2 participants