aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/pbs.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-07-30 23:10:40 +0700
committerSergey M․ <dstftw@gmail.com>2018-07-30 23:10:40 +0700
commit6f2d82a5a0fd020ac36bdfe4faa0ee8a9f4945ac (patch)
tree1638cf460a1382057266508941da120cae46ac14 /youtube_dl/extractor/pbs.py
parent7ff129d3ea6ec010493a3b98d960e943eda05595 (diff)
[pbs] Fix extraction (closes #17109)
Diffstat (limited to 'youtube_dl/extractor/pbs.py')
-rw-r--r--youtube_dl/extractor/pbs.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/youtube_dl/extractor/pbs.py b/youtube_dl/extractor/pbs.py
index 52ab2f158..80340f595 100644
--- a/youtube_dl/extractor/pbs.py
+++ b/youtube_dl/extractor/pbs.py
@@ -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