]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/harpodeon.py
[core] Parse `release_year` from `release_date` (#8524)
[yt-dlp.git] / yt_dlp / extractor / harpodeon.py
index 0aa47337ff8f6e7fabde33af107c0ec82d644414..46eaddb32f7d7e0d7c28f0b65138c907f381cc31 100644 (file)
@@ -1,5 +1,5 @@
 from .common import InfoExtractor
-from ..utils import unified_strdate
+from ..utils import int_or_none
 
 
 class HarpodeonIE(InfoExtractor):
@@ -14,7 +14,7 @@ class HarpodeonIE(InfoExtractor):
             'title': 'The Smoking Out of Bella Butts',
             'description': 'md5:47e16bdb41fc8a79c83ab83af11c8b77',
             'creator': 'Vitagraph Company of America',
-            'release_date': '19150101'
+            'release_year': 1915,
         }
     }, {
         'url': 'https://www.harpodeon.com/preview/The_Smoking_Out_of_Bella_Butts/268068288',
@@ -25,7 +25,7 @@ class HarpodeonIE(InfoExtractor):
             'title': 'The Smoking Out of Bella Butts',
             'description': 'md5:47e16bdb41fc8a79c83ab83af11c8b77',
             'creator': 'Vitagraph Company of America',
-            'release_date': '19150101'
+            'release_year': 1915,
         }
     }, {
         'url': 'https://www.harpodeon.com/preview/Behind_the_Screen/421838710',
@@ -36,7 +36,7 @@ class HarpodeonIE(InfoExtractor):
             'title': 'Behind the Screen',
             'description': 'md5:008972a3dc51fba3965ee517d2ba9155',
             'creator': 'Lone Star Corporation',
-            'release_date': '19160101'
+            'release_year': 1916,
         }
     }]
 
@@ -66,5 +66,5 @@ def _real_extract(self, url):
             'http_headers': {'Referer': url},
             'description': self._html_search_meta('description', webpage, fatal=False),
             'creator': creator,
-            'release_date': unified_strdate(f'{release_year}0101')
+            'release_year': int_or_none(release_year),
         }