mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-24 07:26:05 +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,10 +92,11 @@ class CeskaTelevizeIE(InfoExtractor):
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
url = url.replace('/porady/', '/ivysilani/').replace('/video/', '')
|
||||
|
||||
mobj = re.match(self._VALID_URL, url)
|
||||
playlist_id = mobj.group('id')
|
||||
|
||||
url = url.replace('/porady/', '/ivysilani/', 1)
|
||||
url = url.replace('/video/', '/obsah/', 1)
|
||||
|
||||
webpage = self._download_webpage(url, playlist_id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user