[generic] Extract RSS video timestamp
authorSergey M․ <dstftw@gmail.com>
Sun, 6 Dec 2020 15:30:30 +0000 (22:30 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 6 Dec 2020 15:30:30 +0000 (22:30 +0700)
youtube_dl/extractor/generic.py

index 8ed2789d0d7469928a66b0a7667f76da95674992..d0e0d69194abc1873695fdb90cc0842b452e1211 100644 (file)
@@ -30,6 +30,7 @@ from ..utils import (
     smuggle_url,
     unescapeHTML,
     unified_strdate,
+    unified_timestamp,
     unsmuggle_url,
     UnsupportedError,
     xpath_text,
@@ -2208,6 +2209,8 @@ class GenericIE(InfoExtractor):
                 'url': next_url,
                 'title': it.find('title').text,
                 'description': xpath_text(it, 'description', default=None),
+                'timestamp': unified_timestamp(
+                    xpath_text(it, 'pubDate', default=None)),
             })
 
         return {