Add group videos support for motherless
authorFilip B <b_filip@zoho.com>
Fri, 24 Oct 2014 17:44:21 +0000 (21:44 +0400)
committerFilip B <b_filip@zoho.com>
Fri, 24 Oct 2014 17:44:21 +0000 (21:44 +0400)
Modified motherless regular expression.
Previously it matched only URLs like this:
motherless.com/ID
Now it also matches this:
motherless.com/g/group_name/ID
All tests including the newly added one passed.

youtube_dl/extractor/motherless.py

index 9ce080a30a1d83ceed0aa72586764ae85af15912..50083bd4a6072578e03fd9ebb74725262fc6a4a4 100644 (file)
@@ -11,7 +11,7 @@ from ..utils import (
 
 
 class MotherlessIE(InfoExtractor):
-    _VALID_URL = r'http://(?:www\.)?motherless\.com/(?P<id>[A-Z0-9]+)'
+    _VALID_URL = r'http://(?:www\.)?motherless\.com/(?:g/[a-z0-9_]+/)?(?P<id>[A-Z0-9]+)'
     _TESTS = [
         {
             'url': 'http://motherless.com/AC3FFE1',