From 5b7d70d625cc36f5d799828261b610bbc14b390c Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Fri, 27 May 2016 22:03:12 -0500 Subject: [PATCH] Updated Test Cases Added test case for original video downloading, Updated md5 and duration for the old test case as google probably changed how video processing works on their servers, breaking the md5 and duration tests. --- youtube_dl/extractor/googledrive.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/googledrive.py b/youtube_dl/extractor/googledrive.py index a74b7179f..7e1b7d5a9 100644 --- a/youtube_dl/extractor/googledrive.py +++ b/youtube_dl/extractor/googledrive.py @@ -13,12 +13,27 @@ class GoogleDriveIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:docs|drive)\.google\.com/(?:uc\?.*?id=|file/d/)|video\.google\.com/get_player\?.*?docid=)(?P[a-zA-Z0-9_-]{28,})' _TESTS = [{ 'url': 'https://drive.google.com/file/d/0ByeS4oOUV-49Zzh4R1J6R09zazQ/edit?pli=1', - 'md5': '881f7700aec4f538571fa1e0eed4a7b6', + 'md5': '5c602afbbf2c1db91831f5d82f678554', + 'params': { + 'format': "Original" + }, 'info_dict': { 'id': '0ByeS4oOUV-49Zzh4R1J6R09zazQ', 'ext': 'mp4', 'title': 'Big Buck Bunny.mp4', - 'duration': 46, + 'duration': 45, + } + }, { + 'url': 'https://drive.google.com/file/d/0ByeS4oOUV-49Zzh4R1J6R09zazQ/edit?pli=1', + 'md5': 'd109872761f7e7ecf353fa108c0dbe1e', + 'params': { + 'format': "37" + }, + 'info_dict': { + 'id': '0ByeS4oOUV-49Zzh4R1J6R09zazQ', + 'ext': 'mp4', + 'title': 'Big Buck Bunny.mp4', + 'duration': 45, } }, { # video id is longer than 28 characters @@ -105,7 +120,7 @@ class GoogleDriveIE(InfoExtractor): 'filesize': originalSize, 'protocol': 'https', }) - + return { 'id': video_id, 'title': title,