aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/openload.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-09-24 14:27:08 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-09-24 14:27:08 +0800
commit0711995bcac2f44e09a943521dceb1c54bf8ffb7 (patch)
tree5973ca0ab742cbb8864e5c2b94a0a985102fa387 /youtube_dl/extractor/openload.py
parent5968d7d2fe619e85eb424d6e47d000f0b295d4a2 (diff)
downloadyoutube-dl-0711995bcac2f44e09a943521dceb1c54bf8ffb7.zip
youtube-dl-0711995bcac2f44e09a943521dceb1c54bf8ffb7.tar.gz
youtube-dl-0711995bcac2f44e09a943521dceb1c54bf8ffb7.tar.bz2
[openload] Support subtitles (closes #10625)
Diffstat (limited to 'youtube_dl/extractor/openload.py')
-rw-r--r--youtube_dl/extractor/openload.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py
index b6e3ac2..4f51751 100644
--- a/youtube_dl/extractor/openload.py
+++ b/youtube_dl/extractor/openload.py
@@ -25,6 +25,22 @@ class OpenloadIE(InfoExtractor):
'thumbnail': 're:^https?://.*\.jpg$',
},
}, {
+ 'url': 'https://openload.co/embed/rjC09fkPLYs',
+ 'info_dict': {
+ 'id': 'rjC09fkPLYs',
+ 'ext': 'mp4',
+ 'title': 'movie.mp4',
+ 'thumbnail': 're:^https?://.*\.jpg$',
+ 'subtitles': {
+ 'en': [{
+ 'ext': 'vtt',
+ }],
+ },
+ },
+ 'params': {
+ 'skip_download': True, # test subtitles only
+ },
+ }, {
'url': 'https://openload.co/embed/kUEfGclsU9o/skyrim_no-audio_1080.mp4',
'only_matching': True,
}, {
@@ -71,11 +87,17 @@ class OpenloadIE(InfoExtractor):
'title', default=None) or self._html_search_meta(
'description', webpage, 'title', fatal=True)
- return {
+ entries = self._parse_html5_media_entries(url, webpage, video_id)
+ subtitles = entries[0]['subtitles'] if entries else None
+
+ info_dict = {
'id': video_id,
'title': title,
'thumbnail': self._og_search_thumbnail(webpage, default=None),
'url': video_url,
# Seems all videos have extensions in their titles
'ext': determine_ext(title),
+ 'subtitles': subtitles,
}
+
+ return info_dict