From: zx8 Date: Sun, 14 Jun 2015 23:27:43 +0000 (+0100) Subject: [safari] make url regex more lenient X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=2a0fcf6113c3f0c8d0510167fd7017cc0fdfa622;p=youtube-dl [safari] make url regex more lenient --- 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\d+)/ + (?P[^/]+)/ (?:chapter(?:-content)?/)? (?Ppart\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\d+)/?(?:[#?]|$)' + _VALID_URL = r'https?://(?:www\.)?safaribooksonline\.com/(?:library/view/[^/]+|api/v1/book)/(?P[^/]+)/?(?:[#?]|$)' _TESTS = [{ 'url': 'https://www.safaribooksonline.com/library/view/hadoop-fundamentals-livelessons/9780133392838/',