修复短链无法识别的问题

This commit is contained in:
悠静萝莉
2024-06-24 03:59:45 +08:00
committed by GitHub
parent e4ce4120c7
commit 5e8c71ea5d
+3
View File
@@ -28,6 +28,9 @@ def parse_cookie(text: str):
# 输入id选项
def ids(ids):
if '163cn.tv' in ids:
response = requests.get(ids, allow_redirects=False)
ids = response.headers.get('Location')
if 'music.163.com' in ids:
index = ids.find('id=') + 3
ids = ids[index:].split('&')[0]