diff options
author | Sergey M․ <[email protected]> | 2017-08-28 00:50:41 +0700 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2017-08-28 00:50:41 +0700 |
commit | 1b41da488df64bd41463a79691330e555f79ac2d (patch) | |
tree | 5a2c5250c571ec816e1c28d2f117b1848180b598 | |
parent | fea82c1780cc751267fd2b9b4145996bfc0c1994 (diff) | |
download | youtube-dl-1b41da488df64bd41463a79691330e555f79ac2d.tar.gz youtube-dl-1b41da488df64bd41463a79691330e555f79ac2d.zip |
[googledrive] Extend _VALID_URL (closes #9785)
-rw-r--r-- | youtube_dl/extractor/googledrive.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/youtube_dl/extractor/googledrive.py b/youtube_dl/extractor/googledrive.py index 37d373901..3bf462d63 100644 --- a/youtube_dl/extractor/googledrive.py +++ b/youtube_dl/extractor/googledrive.py @@ -13,7 +13,18 @@ from ..utils import ( class GoogleDriveIE(InfoExtractor): - _VALID_URL = r'https?://(?:(?:docs|drive)\.google\.com/(?:uc\?.*?id=|file/d/)|video\.google\.com/get_player\?.*?docid=)(?P<id>[a-zA-Z0-9_-]{28,})' + _VALID_URL = r'''(?x) + https?:// + (?: + (?:docs|drive)\.google\.com/ + (?: + (?:uc|open)\?.*?id=| + file/d/ + )| + video\.google\.com/get_player\?.*?docid= + ) + (?P<id>[a-zA-Z0-9_-]{28,}) + ''' _TESTS = [{ 'url': 'https://drive.google.com/file/d/0ByeS4oOUV-49Zzh4R1J6R09zazQ/edit?pli=1', 'md5': '5c602afbbf2c1db91831f5d82f678554', @@ -42,7 +53,13 @@ class GoogleDriveIE(InfoExtractor): 'title': 'Andreea Banica feat Smiley - Hooky Song (Official Video).mp4', 'duration': 189, }, - 'only_matching': True + 'only_matching': True, + }, { + 'url': 'https://drive.google.com/open?id=0B2fjwgkl1A_CX083Tkowdmt6d28', + 'only_matching': True, + }, { + 'url': 'https://drive.google.com/uc?id=0B2fjwgkl1A_CX083Tkowdmt6d28', + 'only_matching': True, }] _FORMATS_EXT = { '5': 'flv', |