]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
screencast.com: support missing www
authorMartin Trigaux <me@mart-e.be>
Tue, 29 Mar 2016 12:18:44 +0000 (14:18 +0200)
committerSergey M․ <dstftw@gmail.com>
Fri, 1 Apr 2016 16:58:16 +0000 (22:58 +0600)
The "www." part of the URL is not mandatory

youtube_dl/extractor/screencast.py

index dfd897ba3a3f0a7297164fb315e4543bb597d678..d5111c6293d70abbcd45ba90bc6b87986346731e 100644 (file)
@@ -12,7 +12,7 @@ from ..utils import (
 
 
 class ScreencastIE(InfoExtractor):
-    _VALID_URL = r'https?://www\.screencast\.com/t/(?P<id>[a-zA-Z0-9]+)'
+    _VALID_URL = r'https?://(?:www\.)?screencast\.com/t/(?P<id>[a-zA-Z0-9]+)'
     _TESTS = [{
         'url': 'http://www.screencast.com/t/3ZEjQXlT',
         'md5': '917df1c13798a3e96211dd1561fded83',
@@ -34,7 +34,7 @@ class ScreencastIE(InfoExtractor):
             'thumbnail': 're:^https?://.*\.(?:gif|jpg)$',
         }
     }, {
-        'url': 'http://www.screencast.com/t/aAB3iowa',
+        'url': 'http://screencast.com/t/aAB3iowa',
         'md5': 'dedb2734ed00c9755761ccaee88527cd',
         'info_dict': {
             'id': 'aAB3iowa',