summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2019-10-29 05:52:15 +0700
committerSergey M․ <dstftw@gmail.com>2019-10-29 05:52:15 +0700
commitaef9f87ea4dcfe483c5b776f1c37310766ad818d (patch)
tree8af7b70f9fef9ea7be3875d96943b78180e0e496
parentdd90a21c28cb1ec592e5961a5f67556edfb3ce87 (diff)
downloadyoutube-dl-aef9f87ea4dcfe483c5b776f1c37310766ad818d.tar.gz
youtube-dl-aef9f87ea4dcfe483c5b776f1c37310766ad818d.tar.xz
youtube-dl-aef9f87ea4dcfe483c5b776f1c37310766ad818d.zip
[go] Improve and beautify _VALID_URL
-rw-r--r--youtube_dl/extractor/go.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/youtube_dl/extractor/go.py b/youtube_dl/extractor/go.py
index 107059023..03cfba91f 100644
--- a/youtube_dl/extractor/go.py
+++ b/youtube_dl/extractor/go.py
@@ -40,8 +40,17 @@ class GoIE(AdobePassIE):
             'resource_id': 'Disney',
         }
     }
-    _VALID_URL = r'https?://(?:(?:(?P<sub_domain>%s)\.)?go|(?P<sub_domain_2>abc|freeform|disneynow))\.com/(?:(?:[^/]+/)*(?P<id>vdka\w+)|(?:[^/]+/)*(?P<display_id>[^/?#]+))'\
-                 % '|'.join(list(_SITE_INFO.keys()))
+    _VALID_URL = r'''(?x)
+                    https?://
+                        (?:
+                            (?:(?P<sub_domain>%s)\.)?go|
+                            (?P<sub_domain_2>abc|freeform|disneynow)
+                        )\.com/
+                        (?:
+                            (?:[^/]+/)*(?P<id>[Vv][Dd][Kk][Aa]\w+)|
+                            (?:[^/]+/)*(?P<display_id>[^/?\#]+)
+                        )
+                    ''' % '|'.join(list(_SITE_INFO.keys()))
     _TESTS = [{
         'url': 'http://abc.go.com/shows/designated-survivor/video/most-recent/VDKA3807643',
         'info_dict': {