projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dd90a21
)
[go] Improve and beautify _VALID_URL
author
Sergey M․
<dstftw@gmail.com>
Mon, 28 Oct 2019 22:52:15 +0000
(
05:52
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Mon, 28 Oct 2019 22:52:15 +0000
(
05:52
+0700)
youtube_dl/extractor/go.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/go.py
b/youtube_dl/extractor/go.py
index 10705902372abf1398c1dc6719ff582e446c4feb..03cfba91f00ab6134150090c3088fb7f5d6666d7 100644
(file)
--- a/
youtube_dl/extractor/go.py
+++ b/
youtube_dl/extractor/go.py
@@
-40,8
+40,17
@@
class GoIE(AdobePassIE):
'resource_id': 'Disney',
}
}
'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': {
_TESTS = [{
'url': 'http://abc.go.com/shows/designated-survivor/video/most-recent/VDKA3807643',
'info_dict': {