import re from .common import InfoExtractor from ..utils import ( RegexNotFoundError, ExtractorError, ) class GoogleDriveEmbedIE(InfoExtractor): _VALID_URL = r'https?://(?:video\.google\.com/get_player\?.*?docid=|(?:docs|drive)\.google\.com/file/d/)(?P[a-zA-Z0-9_-]{28})' _TEST = { 'url': 'https://docs.google.com/file/d/0B8KB9DRosYGKMXNoeWxqa3JYclE/preview', 'info_dict': { 'id': '0B8KB9DRosYGKMXNoeWxqa3JYclE', 'ext': 'mp4', 'title': 'Jimmy Fallon Sings Since You\'ve Been Gone.wmv', } } @staticmethod def _extract_url(webpage): mobj = re.search( r'