aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/commonprotocols.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/commonprotocols.py')
-rw-r--r--hypervideo_dl/extractor/commonprotocols.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/hypervideo_dl/extractor/commonprotocols.py b/hypervideo_dl/extractor/commonprotocols.py
index d98331a..3708c6a 100644
--- a/hypervideo_dl/extractor/commonprotocols.py
+++ b/hypervideo_dl/extractor/commonprotocols.py
@@ -1,5 +1,6 @@
from __future__ import unicode_literals
+
from .common import InfoExtractor
from ..compat import (
compat_urlparse,
@@ -58,3 +59,16 @@ class MmsIE(InfoExtractor):
'title': title,
'url': url,
}
+
+
+class ViewSourceIE(InfoExtractor):
+ IE_DESC = False
+ _VALID_URL = r'view-source:(?P<url>.+)'
+
+ _TEST = {
+ 'url': 'view-source:https://www.youtube.com/watch?v=BaW_jenozKc',
+ 'only_matching': True
+ }
+
+ def _real_extract(self, url):
+ return self.url_result(self._match_valid_url(url).group('url'))