projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dd94d3
)
[pbs] Add support for subtitles (Closes #6184)
author
Sergey M․
<dstftw@gmail.com>
Thu, 9 Jul 2015 18:58:01 +0000
(
00:58
+0600)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 9 Jul 2015 18:58:01 +0000
(
00:58
+0600)
youtube_dl/extractor/pbs.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/pbs.py
b/youtube_dl/extractor/pbs.py
index 1e2b965f9bd2cffae1ba0607fff22e2663b4ef5d..fec5d65ad94892ca0f40a9e49703c857d98b47a4 100644
(file)
--- 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,
}