提交 7141746f 编写于 作者: H hjdhnx

哔哩解析修复

上级 d07bed84
......@@ -22,7 +22,15 @@ class R(object):
def ok(self, msg='操作成功', url=None, extra=None):
if extra is None:
extra = {}
result = {"code": 200, "msg": msg, "url":url,"header":{"user-agent":"Mozilla/5.0"}}
header = {
"user-agent": "Mozilla/5.0"
}
if 'bilivideo.com' in url:
header.update({
'referer':'https://www.bilibili.com/'
})
result = {"code": 200, "msg": msg, "url":url}
result.update(header)
result.update(extra)
return jsonify(result)
......
3.9.33beta1
\ No newline at end of file
3.9.33beta2
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册