mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-19 09:25:43 +00:00
[youtube] Fix upload date extraction (closes #14065)
This commit is contained in:
parent
5b4bfbfc3b
commit
7998520933
@ -1665,10 +1665,8 @@ def extract_view_count(v_info):
|
|||||||
if not upload_date:
|
if not upload_date:
|
||||||
upload_date = self._search_regex(
|
upload_date = self._search_regex(
|
||||||
[r'(?s)id="eow-date.*?>(.*?)</span>',
|
[r'(?s)id="eow-date.*?>(.*?)</span>',
|
||||||
r'id="watch-uploader-info".*?>.*?(?:Published|Uploaded|Streamed live|Started) on (.+?)</strong>'],
|
r'(?:id="watch-uploader-info".*?>.*?|["\']simpleText["\']\s*:\s*["\'])(?:Published|Uploaded|Streamed live|Started) on (.+?)[<"\']'],
|
||||||
video_webpage, 'upload date', default=None)
|
video_webpage, 'upload date', default=None)
|
||||||
if upload_date:
|
|
||||||
upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split())
|
|
||||||
upload_date = unified_strdate(upload_date)
|
upload_date = unified_strdate(upload_date)
|
||||||
|
|
||||||
video_license = self._html_search_regex(
|
video_license = self._html_search_regex(
|
||||||
|
Loading…
Reference in New Issue
Block a user