diff options
author | zx8 <zx8@mac> | 2015-06-15 00:27:43 +0100 |
---|---|---|
committer | zx8 <zx8@mac> | 2015-06-15 00:27:43 +0100 |
commit | 2a0fcf6113c3f0c8d0510167fd7017cc0fdfa622 (patch) | |
tree | 10f377f206e203822e4c68622351486ad1f3114c /youtube_dl | |
parent | 67d95f177c7ffedfc8f8b086535013a1a7a48b29 (diff) |
[safari] make url regex more lenient
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/safari.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/safari.py b/youtube_dl/extractor/safari.py index 10251f29e..20ba6fa33 100644 --- a/youtube_dl/extractor/safari.py +++ b/youtube_dl/extractor/safari.py @@ -83,7 +83,7 @@ class SafariIE(SafariBaseIE): library/view/[^/]+| api/v1/book )/ - (?P<course_id>\d+)/ + (?P<course_id>[^/]+)/ (?:chapter(?:-content)?/)? (?P<part>part\d+)\.html ''' @@ -122,7 +122,7 @@ class SafariCourseIE(SafariBaseIE): IE_NAME = 'safari:course' IE_DESC = 'safaribooksonline.com online courses' - _VALID_URL = r'https?://(?:www\.)?safaribooksonline\.com/(?:library/view/[^/]+|api/v1/book)/(?P<id>\d+)/?(?:[#?]|$)' + _VALID_URL = r'https?://(?:www\.)?safaribooksonline\.com/(?:library/view/[^/]+|api/v1/book)/(?P<id>[^/]+)/?(?:[#?]|$)' _TESTS = [{ 'url': 'https://www.safaribooksonline.com/library/view/hadoop-fundamentals-livelessons/9780133392838/', |