diff --git a/controllers/parse.py b/controllers/parse.py index 70ba94150ebfc2536aeb44780897cc169978a38f..ae31294223cc6730a80237c203aae431da415c19 100644 --- a/controllers/parse.py +++ b/controllers/parse.py @@ -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) diff --git a/js/version.txt b/js/version.txt index 472e722c774bfd74aafea3e415580ecd81235269..328754e6f117f2a40b816346da9f3e7d5ed7d1a1 100644 --- a/js/version.txt +++ b/js/version.txt @@ -1 +1 @@ -3.9.33beta1 \ No newline at end of file +3.9.33beta2 \ No newline at end of file