X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fteamcoco.py;h=5793dbc1085a86fdf573a432805be129dc62de94;hb=1b40dc92eb27b2a3f299157f83bfc8e95ca42268;hp=e85d452a31277af6a298296bbe07958fec8aac86;hpb=641eb10d34629c177445dd38e9d3f1f73c4cb92f;p=youtube-dl diff --git a/youtube_dl/extractor/teamcoco.py b/youtube_dl/extractor/teamcoco.py index e85d452a3..5793dbc10 100644 --- a/youtube_dl/extractor/teamcoco.py +++ b/youtube_dl/extractor/teamcoco.py @@ -1,8 +1,10 @@ from __future__ import unicode_literals +import base64 import re from .common import InfoExtractor +from ..utils import qualities class TeamcocoIE(InfoExtractor): @@ -24,12 +26,17 @@ class TeamcocoIE(InfoExtractor): 'info_dict': { 'id': '19705', 'ext': 'mp4', - "description": "Louis C.K. got starstruck by George W. Bush, so what? Part one.", - "title": "Louis C.K. Interview Pt. 1 11/3/11", + 'description': 'Louis C.K. got starstruck by George W. Bush, so what? Part one.', + 'title': 'Louis C.K. Interview Pt. 1 11/3/11', 'age_limit': 0, } } ] + _VIDEO_ID_REGEXES = ( + r'"eVar42"\s*:\s*(\d+)', + r'Ginger\.TeamCoco\.openInApp\("video",\s*"([^"]+)"', + r'"id_not"\s*:\s*(\d+)' + ) def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) @@ -37,43 +44,39 @@ class TeamcocoIE(InfoExtractor): display_id = mobj.group('display_id') webpage = self._download_webpage(url, display_id) - video_id = mobj.group("video_id") + video_id = mobj.group('video_id') if not video_id: video_id = self._html_search_regex( - r'