Przeglądaj źródła

[generic] Extract RSS video timestamp

Sergey M․ 4 lat temu
rodzic
commit
5e822c2526
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      youtube_dl/extractor/generic.py

+ 3 - 0
youtube_dl/extractor/generic.py

@@ -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 {