From 08219c4a67961d9e9cf2e3f37fc89cda47e5c8db Mon Sep 17 00:00:00 2001 From: Mister Hat Date: Tue, 3 Nov 2015 19:13:27 -0600 Subject: [PATCH 1/2] [vidzi] fixed. finds url from hash and host in script --- youtube_dl/extractor/vidzi.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/vidzi.py b/youtube_dl/extractor/vidzi.py index 08a5a7b8d..e7c3bc8d9 100644 --- a/youtube_dl/extractor/vidzi.py +++ b/youtube_dl/extractor/vidzi.py @@ -20,13 +20,20 @@ class VidziIE(InfoExtractor): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) - video_url = self._html_search_regex( - r'{\s*file\s*:\s*"([^"]+)"\s*}', webpage, 'video url') + video_host = self._html_search_regex( + r'id=\'vplayer\'>(.*?)', webpage, 'title') return { 'id': video_id, - 'title': title, 'url': video_url, + 'ext': ext, + 'title': title } From fc54f9a0429c117216082c1d9b8b4b4e5c0fa2f2 Mon Sep 17 00:00:00 2001 From: Mister Hat Date: Tue, 3 Nov 2015 19:34:35 -0600 Subject: [PATCH 2/2] [sharesix] fixed. finds new code and navigates to video page --- youtube_dl/extractor/sharesix.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/youtube_dl/extractor/sharesix.py b/youtube_dl/extractor/sharesix.py index ac3e3adf2..ae707d4e5 100644 --- a/youtube_dl/extractor/sharesix.py +++ b/youtube_dl/extractor/sharesix.py @@ -43,18 +43,15 @@ class ShareSixIE(InfoExtractor): ] def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('id') + video_id = self._match_id(url) - fields = { - 'method_free': 'Free' - } - post = compat_urllib_parse.urlencode(fields) - req = compat_urllib_request.Request(url, post) - req.add_header('Content-type', 'application/x-www-form-urlencoded') + webpage = self._download_webpage(url, video_id) - webpage = self._download_webpage(req, video_id, - 'Downloading video page') + code = self._search_regex( + r'\?code=([a-z0-9]+)">Free', webpage, 'free code') + + webpage = self._download_webpage(url + '?code=' + code, video_id, + 'Downloading video page') video_url = self._search_regex( r"var\slnk1\s=\s'([^']+)'", webpage, 'video URL')