aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-07-10 00:58:01 +0600
committerSergey M․ <dstftw@gmail.com>2015-07-10 00:58:01 +0600
commit06a12933f3621c4b5b84346edc0d5bd570f1aac3 (patch)
treea040125dff3dd60d481c83fb3ba228ca4171f330
parent6dd94d3a79353f8e694efaf2fa27f4bb40227aff (diff)
[pbs] Add support for subtitles (Closes #6184)
-rw-r--r--youtube_dl/extractor/pbs.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/pbs.py b/youtube_dl/extractor/pbs.py
index 1e2b965f9..fec5d65ad 100644
--- a/youtube_dl/extractor/pbs.py
+++ b/youtube_dl/extractor/pbs.py
@@ -224,6 +224,14 @@ class PBSIE(InfoExtractor):
rating_str = rating_str.rpartition('-')[2]
age_limit = US_RATINGS.get(rating_str)
+ subtitles = {}
+ closed_captions_url = info.get('closed_captions_url')
+ if closed_captions_url:
+ subtitles['en'] = [{
+ 'ext': 'ttml',
+ 'url': closed_captions_url,
+ }]
+
return {
'id': video_id,
'display_id': display_id,
@@ -234,4 +242,5 @@ class PBSIE(InfoExtractor):
'age_limit': age_limit,
'upload_date': upload_date,
'formats': formats,
+ 'subtitles': subtitles,
}