]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[ndr] Fix description and upload date extraction (Closes #7893)
authorSergey M․ <dstftw@gmail.com>
Fri, 18 Dec 2015 15:34:17 +0000 (21:34 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 18 Dec 2015 15:34:17 +0000 (21:34 +0600)
youtube_dl/extractor/ndr.py

index 16213eed90119266207bd1936adf098050a92c4b..894c513998af07f24d372c65f2d08759e588453f 100644 (file)
@@ -88,10 +88,10 @@ class NDRIE(NDRBaseIE):
             'embedURL', webpage, 'embed URL', fatal=True)
         description = self._search_regex(
             r'<p[^>]+itemprop="description">([^<]+)</p>',
-            webpage, 'description', fatal=False)
+            webpage, 'description', default=None) or self._og_search_description(webpage)
         timestamp = parse_iso8601(
             self._search_regex(
-                r'<span itemprop="datePublished" content="([^"]+)">',
+                r'<span[^>]+itemprop="(?:datePublished|uploadDate)"[^>]+content="([^"]+)"',
                 webpage, 'upload date', fatal=False))
         return {
             '_type': 'url_transparent',