summary refs log tree commit diff
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-07-17 14:17:19 +0100
committerremitamine <remitamine@gmail.com>2015-07-23 11:59:12 +0100
commit3b3d531965f0f36c20f5fa8557481c144170653f (patch)
tree76c0db2d7c1fd58a9088ff5e89185f78e42cdb02
parent653789afc72d1a225b971541fb633dd768d58942 (diff)
downloadyoutube-dl-3b3d531965f0f36c20f5fa8557481c144170653f.tar.gz
youtube-dl-3b3d531965f0f36c20f5fa8557481c144170653f.tar.xz
youtube-dl-3b3d531965f0f36c20f5fa8557481c144170653f.zip
fix embed regex
-rw-r--r--youtube_dl/extractor/googledrive.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/googledrive.py b/youtube_dl/extractor/googledrive.py
index ac891b275..c82c9037f 100644
--- a/youtube_dl/extractor/googledrive.py
+++ b/youtube_dl/extractor/googledrive.py
@@ -4,7 +4,7 @@ from .common import InfoExtractor
 from ..utils import RegexNotFoundError
 
 class GoogleDriveEmbedIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:video\.google\.com/get_player\?.*?docid=|(?:docs|drive)\.google\.com/file/d/)(?P<id>[a-zA-Z0-9-]{28})(?:/preview)'
+    _VALID_URL = r'https?://(?:video\.google\.com/get_player\?.*?docid=|(?:docs|drive)\.google\.com/file/d/)(?P<id>[a-zA-Z0-9_-]{28})'
     _TEST = {
         'url': 'https://docs.google.com/file/d/0B8KB9DRosYGKMXNoeWxqa3JYclE/preview',
         'info_dict': {
@@ -17,7 +17,7 @@ class GoogleDriveEmbedIE(InfoExtractor):
     @staticmethod
     def _extract_url(webpage):
         mobj = re.search(
-            r'<iframe src="https?://(?:video\.google\.com/get_player\?.*?docid=|(?:docs|drive)\.google\.com/file/d/)(?P<id>[a-zA-Z0-9-]{28})(?:/preview)',
+            r'<iframe src="https?://(?:video\.google\.com/get_player\?.*?docid=|(?:docs|drive)\.google\.com/file/d/)(?P<id>[a-zA-Z0-9_-]{28})',
             webpage)
         if mobj:
             return 'https://drive.google.com/file/d/%s' % mobj.group('id')
@@ -31,7 +31,7 @@ class GoogleDriveEmbedIE(InfoExtractor):
         }
 
 class GoogleDriveIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:docs|drive)\.google\.com/(?:uc\?.*?id=|file/d/)(?P<id>[a-zA-Z0-9-]{28})'
+    _VALID_URL = r'https?://(?:docs|drive)\.google\.com/(?:uc\?.*?id=|file/d/)(?P<id>[a-zA-Z0-9_-]{28})'
     _TEST = {
         'url': 'https://drive.google.com/file/d/0ByeS4oOUV-49Zzh4R1J6R09zazQ/edit?pli=1',
         'info_dict': {