1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-26 02:14:32 +01:00

Update zingmp3.py

domain mp3.zing.vn changes to zingmp3.vn
This commit is contained in:
duchppc 2020-08-24 11:13:08 +07:00 committed by GitHub
parent 10709fc7c6
commit 4b27885722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,9 +87,9 @@ class ZingMp3BaseInfoExtractor(InfoExtractor):
class ZingMp3IE(ZingMp3BaseInfoExtractor): class ZingMp3IE(ZingMp3BaseInfoExtractor):
_VALID_URL = r'https?://mp3\.zing\.vn/(?:bai-hat|album|playlist|video-clip)/[^/]+/(?P<id>\w+)\.html' _VALID_URL = r'https?://zingmp3\.vn/(?:bai-hat|album|playlist|video-clip)/[^/]+/(?P<id>\w+)\.html'
_TESTS = [{ _TESTS = [{
'url': 'http://mp3.zing.vn/bai-hat/Xa-Mai-Xa-Bao-Thy/ZWZB9WAB.html', 'url': 'http://zingmp3.vn/bai-hat/Xa-Mai-Xa-Bao-Thy/ZWZB9WAB.html',
'md5': 'ead7ae13693b3205cbc89536a077daed', 'md5': 'ead7ae13693b3205cbc89536a077daed',
'info_dict': { 'info_dict': {
'id': 'ZWZB9WAB', 'id': 'ZWZB9WAB',
@ -98,7 +98,7 @@ class ZingMp3IE(ZingMp3BaseInfoExtractor):
'thumbnail': r're:^https?://.*\.jpg$', 'thumbnail': r're:^https?://.*\.jpg$',
}, },
}, { }, {
'url': 'http://mp3.zing.vn/video-clip/Let-It-Go-Frozen-OST-Sungha-Jung/ZW6BAEA0.html', 'url': 'http://zingmp3.vn/video-clip/Let-It-Go-Frozen-OST-Sungha-Jung/ZW6BAEA0.html',
'md5': '870295a9cd8045c0e15663565902618d', 'md5': '870295a9cd8045c0e15663565902618d',
'info_dict': { 'info_dict': {
'id': 'ZW6BAEA0', 'id': 'ZW6BAEA0',
@ -106,7 +106,7 @@ class ZingMp3IE(ZingMp3BaseInfoExtractor):
'ext': 'mp4', 'ext': 'mp4',
}, },
}, { }, {
'url': 'http://mp3.zing.vn/album/Lau-Dai-Tinh-Ai-Bang-Kieu-Minh-Tuyet/ZWZBWDAF.html', 'url': 'http://zingmp3.vn/album/Lau-Dai-Tinh-Ai-Bang-Kieu-Minh-Tuyet/ZWZBWDAF.html',
'info_dict': { 'info_dict': {
'_type': 'playlist', '_type': 'playlist',
'id': 'ZWZBWDAF', 'id': 'ZWZBWDAF',
@ -115,11 +115,11 @@ class ZingMp3IE(ZingMp3BaseInfoExtractor):
'playlist_count': 10, 'playlist_count': 10,
'skip': 'removed at the request of the owner', 'skip': 'removed at the request of the owner',
}, { }, {
'url': 'http://mp3.zing.vn/playlist/Duong-Hong-Loan-apollobee/IWCAACCB.html', 'url': 'http://zingmp3.vn/playlist/Duong-Hong-Loan-apollobee/IWCAACCB.html',
'only_matching': True, 'only_matching': True,
}] }]
IE_NAME = 'zingmp3' IE_NAME = 'zingmp3'
IE_DESC = 'mp3.zing.vn' IE_DESC = 'zingmp3.vn'
def _real_extract(self, url): def _real_extract(self, url):
page_id = self._match_id(url) page_id = self._match_id(url)