mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-24 13:42:52 +08:00
[ceskatelevize] Fix initial url replace()s
Fixes: https://github.com/rg3/youtube-dl/issues/7411 Test cases: ``` From: http://www.ceskatelevize.cz/porady/1126666764-toulava-kamera/217562221500004 To: http://www.ceskatelevize.cz/ivysilani/1126666764-toulava-kamera/217562221500004 From: http://www.ceskatelevize.cz/porady/1126666764-toulava-kamera/217562221500004/video/519429 To: http://www.ceskatelevize.cz/ivysilani/1126666764-toulava-kamera/217562221500004/obsah/519429 From: http://www.ceskatelevize.cz/ivysilani/1126666764-toulava-kamera/217562221500004/obsah/519429-na-bezkach-po-ceskem-raji To: http://www.ceskatelevize.cz/ivysilani/1126666764-toulava-kamera/217562221500004/obsah/519429-na-bezkach-po-ceskem-raji ```
This commit is contained in:
parent
fac39cccd4
commit
a8a3c3225c
@ -92,11 +92,12 @@ class CeskaTelevizeIE(InfoExtractor):
|
|||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
url = url.replace('/porady/', '/ivysilani/').replace('/video/', '')
|
|
||||||
|
|
||||||
mobj = re.match(self._VALID_URL, url)
|
mobj = re.match(self._VALID_URL, url)
|
||||||
playlist_id = mobj.group('id')
|
playlist_id = mobj.group('id')
|
||||||
|
|
||||||
|
url = url.replace('/porady/', '/ivysilani/', 1)
|
||||||
|
url = url.replace('/video/', '/obsah/', 1)
|
||||||
|
|
||||||
webpage = self._download_webpage(url, playlist_id)
|
webpage = self._download_webpage(url, playlist_id)
|
||||||
|
|
||||||
NOT_AVAILABLE_STRING = 'This content is not available at your territory due to limited copyright.'
|
NOT_AVAILABLE_STRING = 'This content is not available at your territory due to limited copyright.'
|
||||||
|
Loading…
Reference in New Issue
Block a user