From ccf6a90ba861e8664dcf296ee5b798a259b74a52 Mon Sep 17 00:00:00 2001 From: bato3 Date: Sat, 14 Jul 2018 00:32:41 +0200 Subject: [PATCH] fixes after first review --- youtube_dl/extractor/mp4upload.py | 75 +++++++++++++++---------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/youtube_dl/extractor/mp4upload.py b/youtube_dl/extractor/mp4upload.py index 2bb985214..d03b4cc78 100644 --- a/youtube_dl/extractor/mp4upload.py +++ b/youtube_dl/extractor/mp4upload.py @@ -9,6 +9,8 @@ from ..utils import ( decode_packed_codes, get_element_by_class, get_element_by_id, + int_or_none, + float_or_none, parse_filesize, strip_or_none, ) @@ -20,25 +22,19 @@ class Mp4UploadIE(InfoExtractor): _TESTS = [{ 'url': 'http://www.mp4upload.com/e52ycvdl4x29', 'md5': '09780a74b0de79ada5f9a8955f0704fc', - 'info_dict': { 'id': 'e52ycvdl4x29', 'ext': 'mp4', 'title': '橋本潮 - ロマンティックあげるよ.mp4', 'timestamp': 1467471956, 'thumbnail': r're:^https?://.*\.jpg$', - 'vcodec': 'ffh264', 'width': 454, 'height': 360, 'fps': 29.970, - 'acodec': 'ffaac', 'asr': 44100, 'abr': 96, - - # Something adds this to the _real_extract return value, and the test runner expects it present. - # Should probably be autocalculated from the timestamp instead, just like _real_extract. 'upload_date': '20160702', }, }, { @@ -64,13 +60,6 @@ class Mp4UploadIE(InfoExtractor): 'id': video_id, } - file_info = re.findall( - r'>(?P