aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2019-01-08 10:02:00 +0700
committerSergey M․ <dstftw@gmail.com>2019-01-08 10:02:00 +0700
commit391256dc0ee5e6ac8d3022455de207b8b02a5b10 (patch)
tree6707393265f11a2ab452e2f7e144a662b8e83e86
parent06b4b90c70636d8044b7a2f588503cadf8b202d9 (diff)
[extractor/common] Add support for movies in _json_ld
-rw-r--r--youtube_dl/extractor/common.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index e5f8136fc..f507400cc 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -1250,6 +1250,13 @@ class InfoExtractor(object):
part_of_series = e.get('partOfSeries') or e.get('partOfTVSeries')
if isinstance(part_of_series, dict) and part_of_series.get('@type') in ('TVSeries', 'Series', 'CreativeWorkSeries'):
info['series'] = unescapeHTML(part_of_series.get('name'))
+ elif item_type == 'Movie':
+ info.update({
+ 'title': unescapeHTML(e.get('name')),
+ 'description': unescapeHTML(e.get('description')),
+ 'duration': parse_duration(e.get('duration')),
+ 'timestamp': unified_timestamp(e.get('dateCreated')),
+ })
elif item_type in ('Article', 'NewsArticle'):
info.update({
'timestamp': parse_iso8601(e.get('datePublished')),