]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[extractor/common] Improve _json_ld for articles
authorSergey M․ <dstftw@gmail.com>
Sat, 27 Jan 2018 16:23:36 +0000 (23:23 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 27 Jan 2018 16:24:38 +0000 (23:24 +0700)
youtube_dl/extractor/common.py

index a072e9bc9fb94ded50d6c85de0567064683f0e83..deafb48508fc7a0def88e5bd23fab558d37d8213 100644 (file)
@@ -1027,7 +1027,7 @@ 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 == 'Article':
+                elif item_type in ('Article', 'NewsArticle'):
                     info.update({
                         'timestamp': parse_iso8601(e.get('datePublished')),
                         'title': unescapeHTML(e.get('headline')),