From 9036cf5132215645248ce804211e43974b7e4952 Mon Sep 17 00:00:00 2001 From: Niyazi Suleymanov Date: Sat, 16 Jul 2022 23:11:50 +0400 Subject: [PATCH] add new test --- youtube_dl/extractor/newgrounds.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/newgrounds.py b/youtube_dl/extractor/newgrounds.py index f65843358..3f4a5d11f 100644 --- a/youtube_dl/extractor/newgrounds.py +++ b/youtube_dl/extractor/newgrounds.py @@ -26,6 +26,17 @@ class NewgroundsIE(InfoExtractor): 'upload_date': '20130911', 'duration': 143, }, + }, { + 'url': 'https://www.newgrounds.com/portal/view/850292', + 'md5': 'bb7cacf45e1b4d648e2dac2d79284d67', + 'info_dict': { + 'id': '850292', + 'ext': 'mp4', + 'title': 'Timeless (2021)', + 'uploader': 'Kevuhn', + 'timestamp': 1657896960, + 'upload_date': '20220715', + }, }, { # source format unavailable, additional mp4 formats 'url': 'http://www.newgrounds.com/portal/view/689400', @@ -44,7 +55,7 @@ class NewgroundsIE(InfoExtractor): def _real_extract(self, url): media_id = self._match_id(url) - + webpage = self._download_webpage(url, media_id) title = self._html_search_regex( @@ -80,7 +91,6 @@ class NewgroundsIE(InfoExtractor): (r'(?s)]*>(.+?).*?\s*Author\s*', r'(?:Author|Writer)\s*]+>([^<]+)'), webpage, 'uploader', fatal=False) - timestamp = unified_timestamp(self._html_search_regex( (r'
\s*Uploaded\s*
\s*
([^<]+
\s*
[^<]+)', r'
\s*Uploaded\s*
\s*
([^<]+)'), webpage, 'timestamp',