From 5e8c71ea5d2795269b625bc16f06b58b51708ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=82=A0=E9=9D=99=E8=90=9D=E8=8E=89?= Date: Mon, 24 Jun 2024 03:59:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9F=AD=E9=93=BE=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=AF=86=E5=88=AB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.py b/main.py index b92cc69..a92f1a3 100644 --- a/main.py +++ b/main.py @@ -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]