]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[togglesg] Fixes
authorping <lipng.ong@gmail.com>
Thu, 17 Sep 2015 16:51:41 +0000 (00:51 +0800)
committerSergey M․ <dstftw@gmail.com>
Sat, 19 Dec 2015 12:48:59 +0000 (18:48 +0600)
youtube_dl/extractor/togglesg.py

index 56ef4b464f29492fb1113d1284124430765b8a8c..9f958d453576948c0e7a1c13eca57d28678dc0b3 100644 (file)
@@ -18,7 +18,7 @@ from ..compat import compat_urllib_request
 
 class ToggleSgIE(InfoExtractor):
     IE_NAME = 'togglesg'
-    _VALID_URL = r'https?://video\.toggle\.sg/(?:(en|zh))/(?:(series|clips|movies))/.+?/(?P<id>[0-9]+)'
+    _VALID_URL = r'https?://video\.toggle\.sg/(?:en|zh)/(?:series|clips|movies)/.+?/(?P<id>[0-9]+)'
     _TESTS = [{
         'url': 'http://video.toggle.sg/en/series/lion-moms-tif/trailers/lion-moms-premier/343115',
         'info_dict': {
@@ -90,9 +90,9 @@ class ToggleSgIE(InfoExtractor):
         webpage = self._download_webpage(url, video_id, note='Downloading video page')
 
         api_user = self._search_regex(
-            r'apiUser:\s*"([^"]+)"', webpage, 'apiUser', default=self._API_USER, fatal=False)
+            r'apiUser:\s*"([^"]+)"', webpage, 'apiUser', default=self._API_USER)
         api_pass = self._search_regex(
-            r'apiPass:\s*"([^"]+)"', webpage, 'apiPass', default=self._API_PASS, fatal=False)
+            r'apiPass:\s*"([^"]+)"', webpage, 'apiPass', default=self._API_PASS)
 
         params = {
             'initObj': {