mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-23 08:17:00 +00:00
[teamcoco] Fix video id extraction
This commit is contained in:
parent
054fe3cc40
commit
3811c567e7
1 changed files with 6 additions and 2 deletions
|
@ -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):
|
def _real_extract(self, url):
|
||||||
mobj = re.match(self._VALID_URL, url)
|
mobj = re.match(self._VALID_URL, url)
|
||||||
|
@ -40,8 +45,7 @@ class TeamcocoIE(InfoExtractor):
|
||||||
video_id = mobj.group("video_id")
|
video_id = mobj.group("video_id")
|
||||||
if not video_id:
|
if not video_id:
|
||||||
video_id = self._html_search_regex(
|
video_id = self._html_search_regex(
|
||||||
r'<div\s+class="player".*?data-id="(\d+?)"',
|
self._VIDEO_ID_REGEXES, webpage, 'video id')
|
||||||
webpage, 'video id')
|
|
||||||
|
|
||||||
data_url = 'http://teamcoco.com/cvp/2.0/%s.xml' % video_id
|
data_url = 'http://teamcoco.com/cvp/2.0/%s.xml' % video_id
|
||||||
data = self._download_xml(
|
data = self._download_xml(
|
||||||
|
|
Loading…
Reference in a new issue