aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Rudloff <contact@rudloff.pro>2014-01-23 23:42:34 +0100
committerPierre Rudloff <contact@rudloff.pro>2014-01-23 23:42:34 +0100
commit67ccb7719715d8edaee291f7ab4f5d5caad3d48f (patch)
tree2763479da97ab2ed805845d5455287b85857a8e7
parent629be17af42fdb448a36a007900697d4998c3b4b (diff)
Removed websurg extractor
-rw-r--r--youtube_dl/extractor/__init__.py1
-rw-r--r--youtube_dl/extractor/websurg.py59
2 files changed, 0 insertions, 60 deletions
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py
index 118982ff8..90c6a8fdb 100644
--- a/youtube_dl/extractor/__init__.py
+++ b/youtube_dl/extractor/__init__.py
@@ -218,7 +218,6 @@ from .vine import VineIE
from .viki import VikiIE
from .vk import VKIE
from .wat import WatIE
-from .websurg import WeBSurgIE
from .weibo import WeiboIE
from .wimp import WimpIE
from .wistia import WistiaIE
diff --git a/youtube_dl/extractor/websurg.py b/youtube_dl/extractor/websurg.py
deleted file mode 100644
index 43953bfdd..000000000
--- a/youtube_dl/extractor/websurg.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# coding: utf-8
-
-import re
-
-from ..utils import (
- compat_urllib_request,
- compat_urllib_parse
-)
-
-from .common import InfoExtractor
-
-class WeBSurgIE(InfoExtractor):
- IE_NAME = u'websurg.com'
- _VALID_URL = r'http://.*?\.websurg\.com/MEDIA/\?noheader=1&doi=(.*)'
-
- _TEST = {
- u'url': u'http://www.websurg.com/MEDIA/?noheader=1&doi=vd01en4012',
- u'file': u'vd01en4012.mp4',
- u'params': {
- u'skip_download': True,
- },
- u'skip': u'Requires login information',
- }
-
- _LOGIN_URL = 'http://www.websurg.com/inc/login/login_div.ajax.php?login=1'
-
- def _real_initialize(self):
-
- login_form = {
- 'username': self._downloader.params['username'],
- 'password': self._downloader.params['password'],
- 'Submit': 1
- }
-
- request = compat_urllib_request.Request(
- self._LOGIN_URL, compat_urllib_parse.urlencode(login_form))
- request.add_header(
- 'Content-Type', 'application/x-www-form-urlencoded;charset=utf-8')
- compat_urllib_request.urlopen(request).info()
- webpage = self._download_webpage(self._LOGIN_URL, '', 'Logging in')
-
- if webpage != 'OK':
- self._downloader.report_error(
- u'Unable to log in: bad username/password')
-
- def _real_extract(self, url):
- video_id = re.match(self._VALID_URL, url).group(1)
-
- webpage = self._download_webpage(url, video_id)
-
- url_info = re.search(r'streamer="(.*?)" src="(.*?)"', webpage)
-
- return {'id': video_id,
- 'title': self._og_search_title(webpage),
- 'description': self._og_search_description(webpage),
- 'ext' : 'mp4',
- 'url' : url_info.group(1) + '/' + url_info.group(2),
- 'thumbnail': self._og_search_thumbnail(webpage)
- }