diff options
author | Naglis Jonaitis <[email protected]> | 2015-02-11 15:47:19 +0200 |
---|---|---|
committer | Naglis Jonaitis <[email protected]> | 2015-02-11 15:47:19 +0200 |
commit | 3811c567e734f38f830e8c2e0a45afa7c48cbf12 (patch) | |
tree | 1c7c536e30cb5a9ec98907d5f1e3583a8f2d7b44 /youtube_dl/extractor/teamcoco.py | |
parent | 054fe3cc40cc0feaa69e21b31946c568a749eb76 (diff) | |
download | youtube-dl-3811c567e734f38f830e8c2e0a45afa7c48cbf12.tar.gz youtube-dl-3811c567e734f38f830e8c2e0a45afa7c48cbf12.zip |
[teamcoco] Fix video id extraction
Diffstat (limited to 'youtube_dl/extractor/teamcoco.py')
-rw-r--r-- | youtube_dl/extractor/teamcoco.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/extractor/teamcoco.py b/youtube_dl/extractor/teamcoco.py index e85d452a3..a73da1c9c 100644 --- a/youtube_dl/extractor/teamcoco.py +++ b/youtube_dl/extractor/teamcoco.py @@ -30,6 +30,11 @@ class TeamcocoIE(InfoExtractor): } } ] + _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) @@ -40,8 +45,7 @@ class TeamcocoIE(InfoExtractor): video_id = mobj.group("video_id") if not video_id: video_id = self._html_search_regex( - r'<div\s+class="player".*?data-id="(\d+?)"', - webpage, 'video id') + self._VIDEO_ID_REGEXES, webpage, 'video id') data_url = 'http://teamcoco.com/cvp/2.0/%s.xml' % video_id data = self._download_xml( |