We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
响应中含有webpage参数的情况参见问题#74。 在该情况下,websign、websignkey这两个参数的正则解析失败,这是由于这两个参数的名字已变为awebsigna、cwebsignkeyc。 在lanzou/api/core.py的第519~520行,对正则表达式进行相应的修改即可:
websign
websignkey
awebsigna
cwebsignkeyc
web_sign = re.search(r"var awebsigna\s*=\s*'(.+?)';", first_page).group(1) web_sign_key = re.search(r"var cwebsignkeyc\s*=\s*'(.+?)';", first_page).group(1)
此外,直接对正则解析的返回对象的域取值是不安全的,因为返回对象有可能是None。推荐对re.search的返回值进行判空,或采用异常处理包装。
re.search
The text was updated successfully, but these errors were encountered:
fixed,🤧抱歉这么久才修,因为实习还有其它事情耽搁了
Sorry, something went wrong.
e24b9d2
fixed zaxtyson/LanZouCloud-API#81
68b9648
辛苦了,非常感谢!
No branches or pull requests
响应中含有webpage参数的情况参见问题#74。
在该情况下,
websign
、websignkey
这两个参数的正则解析失败,这是由于这两个参数的名字已变为awebsigna
、cwebsignkeyc
。在lanzou/api/core.py的第519~520行,对正则表达式进行相应的修改即可:
此外,直接对正则解析的返回对象的域取值是不安全的,因为返回对象有可能是None。推荐对
re.search
的返回值进行判空,或采用异常处理包装。The text was updated successfully, but these errors were encountered: