]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[pbs] Fix extraction (closes #17109)
authorSergey M․ <dstftw@gmail.com>
Mon, 30 Jul 2018 16:10:40 +0000 (23:10 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 30 Jul 2018 16:10:40 +0000 (23:10 +0700)
youtube_dl/extractor/pbs.py

index 52ab2f158e28f3fe5d7553beb7a0c108c2608641..80340f595c11df34e58899d481edc887f55a8837 100644 (file)
@@ -15,6 +15,7 @@ from ..utils import (
     strip_jsonp,
     strip_or_none,
     unified_strdate,
+    url_or_none,
     US_RATINGS,
 )
 
@@ -557,6 +558,13 @@ class PBSIE(InfoExtractor):
                 if redirect_url and redirect_url not in redirect_urls:
                     redirects.append(redirect)
                     redirect_urls.add(redirect_url)
+            encodings = info.get('encodings')
+            if isinstance(encodings, list):
+                for encoding in encodings:
+                    encoding_url = url_or_none(encoding)
+                    if encoding_url and encoding_url not in redirect_urls:
+                        redirects.append({'url': encoding_url})
+                        redirect_urls.add(encoding_url)
 
         chapters = []
         # Player pages may also serve different qualities