projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
653789a
)
fix embed regex
author
remitamine
<remitamine@gmail.com>
Fri, 17 Jul 2015 13:17:19 +0000
(14:17 +0100)
committer
remitamine
<remitamine@gmail.com>
Thu, 23 Jul 2015 10:59:12 +0000
(11:59 +0100)
youtube_dl/extractor/googledrive.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/googledrive.py
b/youtube_dl/extractor/googledrive.py
index ac891b27519e58b561108b28b77e0154118299d0..c82c9037fa1c70884fc00d93fa5521f5d70bde5e 100644
(file)
--- 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):
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': {
_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(
@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')
webpage)
if mobj:
return 'https://drive.google.com/file/d/%s' % mobj.group('id')
@@
-31,7
+31,7
@@
class GoogleDriveEmbedIE(InfoExtractor):
}
class GoogleDriveIE(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': {
_TEST = {
'url': 'https://drive.google.com/file/d/0ByeS4oOUV-49Zzh4R1J6R09zazQ/edit?pli=1',
'info_dict': {