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

[dnb] fix id (can also have letters such as "X")

This commit is contained in:
user706 2019-01-02 23:30:10 +01:00
parent b491341a9d
commit db2672eb11

View File

@ -7,7 +7,7 @@ import json
class DNBIE(InfoExtractor): class DNBIE(InfoExtractor):
_VALID_URL = r'https?://(?:portal\.dnb\.de/audioplayer/do/show/|d-nb\.info/)(?P<id>[0-9]+)' _VALID_URL = r'https?://(?:portal\.dnb\.de/audioplayer/do/show/|d-nb\.info/)(?P<id>\w+)[/&]?'
_TESTS = [{ _TESTS = [{
'url': 'https://portal.dnb.de/audioplayer/do/show/1077188552#dcId=1546432571580&p=1', 'url': 'https://portal.dnb.de/audioplayer/do/show/1077188552#dcId=1546432571580&p=1',
'md5': 'cdef1faf339db9978b27c70ef4c0516b', 'md5': 'cdef1faf339db9978b27c70ef4c0516b',
@ -39,6 +39,7 @@ class DNBIE(InfoExtractor):
def _real_extract(self, url): def _real_extract(self, url):
video_id = self._match_id(url) video_id = self._match_id(url)
url = 'https://portal.dnb.de/audioplayer/do/show/' + video_id url = 'https://portal.dnb.de/audioplayer/do/show/' + video_id
print('url', url)
webpage = self._download_webpage(url, video_id) webpage = self._download_webpage(url, video_id)
m = re.search(r'fdnbpl.media\s*=\s*(\[.*\]);', webpage) m = re.search(r'fdnbpl.media\s*=\s*(\[.*\]);', webpage)