Skip to content

Commit

Permalink
[pbs] Fix extraction (closes #17109)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey M․ committed Jul 30, 2018
1 parent 7ff129d commit 6f2d82a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions youtube_dl/extractor/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
strip_jsonp,
strip_or_none,
unified_strdate,
url_or_none,
US_RATINGS,
)

Expand Down Expand Up @@ -557,6 +558,13 @@ def extract_redirect_urls(info):
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
Expand Down

0 comments on commit 6f2d82a

Please sign in to comment.