From 713c5d98afb05d52506df04098e267c51cfe7c58 Mon Sep 17 00:00:00 2001 From: Harold <8866033@gmail.com> Date: Sat, 25 Apr 2026 09:01:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20AAZ=E9=9F=B3=E4=B9=90=20detail=20?= =?UTF-8?q?parsing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/AAZ音乐.py | 93 ++++++++++++++++++++++++++++++++++++++++ py/tests/test_AAZ音乐.py | 56 ++++++++++++++++++++++++ 2 files changed, 149 insertions(+) diff --git a/py/AAZ音乐.py b/py/AAZ音乐.py index 78c3826..1d21689 100644 --- a/py/AAZ音乐.py +++ b/py/AAZ音乐.py @@ -139,6 +139,61 @@ class Spider(BaseSpider): ) return items + def _decode_vod_id(self, vod_id): + raw = str(vod_id or "").strip() + if ":" not in raw: + return "", "" + prefix, value = raw.split(":", 1) + if prefix == "song": + return prefix, "/m/%s.html" % value + if prefix == "singer": + return prefix, "/s/%s" % value + if prefix == "playlist": + return prefix, "/p/%s" % value + if prefix == "album": + return prefix, "/a/%s" % value + if prefix == "mv": + return prefix, "/v/%s" % value + return "", "" + + def _parse_song_detail(self, html, song_id): + title_match = re.search( + r'