aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/videomega.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-02-26 15:00:48 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-02-26 15:00:48 +0800
commite4fc8d2ebedfc6ea7f66ff9146940c73802a2edf (patch)
treef9a68ddbc23b49d9c59e5c92f21bde60cb5829de /youtube_dl/extractor/videomega.py
parentf52354a88927eb66bcb1f603d2d91162b5bd2b5f (diff)
[videomega] Fix extraction (closes #7606)
Diffstat (limited to 'youtube_dl/extractor/videomega.py')
-rw-r--r--youtube_dl/extractor/videomega.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/youtube_dl/extractor/videomega.py b/youtube_dl/extractor/videomega.py
index 5e2e7cbac..4f0dcd18c 100644
--- a/youtube_dl/extractor/videomega.py
+++ b/youtube_dl/extractor/videomega.py
@@ -4,11 +4,13 @@ from __future__ import unicode_literals
import re
from .common import InfoExtractor
-from ..utils import sanitized_Request
+from ..utils import (
+ decode_packed_codes,
+ sanitized_Request,
+)
class VideoMegaIE(InfoExtractor):
- _WORKING = False
_VALID_URL = r'(?:videomega:|https?://(?:www\.)?videomega\.tv/(?:(?:view|iframe|cdn)\.php)?\?ref=)(?P<id>[A-Za-z0-9]+)'
_TESTS = [{
'url': 'http://videomega.tv/cdn.php?ref=AOSQBJYKIDDIKYJBQSOA',
@@ -42,8 +44,10 @@ class VideoMegaIE(InfoExtractor):
r'(?:^[Vv]ideo[Mm]ega\.tv\s-\s*|\s*-\svideomega\.tv$)', '', title)
thumbnail = self._search_regex(
r'<video[^>]+?poster="([^"]+)"', webpage, 'thumbnail', fatal=False)
+
+ real_codes = decode_packed_codes(webpage)
video_url = self._search_regex(
- r'<source[^>]+?src="([^"]+)"', webpage, 'video URL')
+ r'"src"\s*,\s*"([^"]+)"', real_codes, 'video URL')
return {
'id': video_id,