1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[core] Parse release_year from release_date (#8524)

Closes #7263
Authored by: seproDev
This commit is contained in:
sepro
2023-11-26 03:12:05 +01:00
committed by GitHub
parent a0b19d319a
commit 1732eccc0a
8 changed files with 17 additions and 13 deletions

View 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 @@ class HarpodeonIE(InfoExtractor):
'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),
}