From 743ee8b2bba6c1c7a1c5806c55ee96042be373f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E6=99=93=E6=99=B4?= <37541680+Suxiaoqinx@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:26:16 +0800 Subject: [PATCH] Update main.py --- main.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/main.py b/main.py index 16bf641..03f3ed7 100644 --- a/main.py +++ b/main.py @@ -23,15 +23,6 @@ def parse_cookie(text: str): cookie_ = {k.strip(): v.strip() for k, v in cookie_} return cookie_ -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] - return ids - def read_cookie(): script_dir = os.path.dirname(os.path.abspath(__file__)) cookie_file = os.path.join(script_dir, 'cookie.txt')