diff options
author | Jesus <heckyel@riseup.net> | 2023-09-04 01:59:36 +0800 |
---|---|---|
committer | Jesus <heckyel@riseup.net> | 2023-09-04 01:59:36 +0800 |
commit | b3013540b41d1eb77c4803c5fca46f8d75b40fc1 (patch) | |
tree | 97735cb0c49f3a2b0f276e1cd90817833d590d69 /hypervideo_dl/extractor/ximalaya.py | |
parent | eaeeef9c1d1bedb76fea953c332ef84d53bffe2c (diff) | |
download | hypervideo-b3013540b41d1eb77c4803c5fca46f8d75b40fc1.tar.lz hypervideo-b3013540b41d1eb77c4803c5fca46f8d75b40fc1.tar.xz hypervideo-b3013540b41d1eb77c4803c5fca46f8d75b40fc1.zip |
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/ximalaya.py')
-rw-r--r-- | hypervideo_dl/extractor/ximalaya.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/hypervideo_dl/extractor/ximalaya.py b/hypervideo_dl/extractor/ximalaya.py index b25be77..3d5e6cf 100644 --- a/hypervideo_dl/extractor/ximalaya.py +++ b/hypervideo_dl/extractor/ximalaya.py @@ -36,7 +36,7 @@ class XimalayaIE(XimalayaBaseIE): 'height': 180 } ], - 'categories': ['人文'], + 'categories': ['其他'], 'duration': 93, 'view_count': int, 'like_count': int, @@ -123,7 +123,7 @@ class XimalayaIE(XimalayaBaseIE): class XimalayaAlbumIE(XimalayaBaseIE): IE_NAME = 'ximalaya:album' IE_DESC = '喜马拉雅FM 专辑' - _VALID_URL = r'https?://(?:www\.|m\.)?ximalaya\.com/\d+/album/(?P<id>[0-9]+)' + _VALID_URL = r'https?://(?:www\.|m\.)?ximalaya\.com/(?:\d+/)?album/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'http://www.ximalaya.com/61425525/album/5534601/', 'info_dict': { @@ -131,6 +131,13 @@ class XimalayaAlbumIE(XimalayaBaseIE): 'id': '5534601', }, 'playlist_mincount': 323, + }, { + 'url': 'https://www.ximalaya.com/album/6912905', + 'info_dict': { + 'title': '埃克哈特《修炼当下的力量》', + 'id': '6912905', + }, + 'playlist_mincount': 41, }] def _real_extract(self, url): @@ -151,7 +158,7 @@ class XimalayaAlbumIE(XimalayaBaseIE): return self._download_json( 'https://www.ximalaya.com/revision/album/v1/getTracksList', playlist_id, note=f'Downloading tracks list page {page_idx}', - query={'albumId': playlist_id, 'pageNum': page_idx, 'sort': 1})['data'] + query={'albumId': playlist_id, 'pageNum': page_idx})['data'] def _get_entries(self, page_data): for e in page_data['tracks']: |