[dreisat] Make ‘index.php’ optional in the url (fixes #2080)
[youtube-dl] / youtube_dl / extractor / websurg.py
index 96a1bb852a01e9026f531f5806027dfc5de55930..43953bfdd566c2a17b58c124f92ad7dab5c2312b 100644 (file)
@@ -18,7 +18,8 @@ class WeBSurgIE(InfoExtractor):
         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'
@@ -36,8 +37,7 @@ class WeBSurgIE(InfoExtractor):
         request.add_header(
             'Content-Type', 'application/x-www-form-urlencoded;charset=utf-8')
         compat_urllib_request.urlopen(request).info()
-        request = compat_urllib_request.Request(self._LOGIN_URL)
-        webpage = compat_urllib_request.urlopen(request).read()
+        webpage = self._download_webpage(self._LOGIN_URL, '', 'Logging in')
         
         if webpage != 'OK':
             self._downloader.report_error(