mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
wburl: support for new modifier form: $mod as well as 'mod_'
This commit is contained in:
parent
06b9e957e6
commit
7b45df7338
@ -13,6 +13,9 @@ u"""
|
||||
>>> repr(WbUrl('20130102im_/https:/example.com'))
|
||||
"('replay', '20130102', 'im_', 'https://example.com', '20130102im_/https://example.com')"
|
||||
|
||||
>>> repr(WbUrl('20130102$cbr:test-foo.123/https:/example.com'))
|
||||
"('replay', '20130102', '$cbr:test-foo.123', 'https://example.com', '20130102$cbr:test-foo.123/https://example.com')"
|
||||
|
||||
# Protocol agnostic convert to http
|
||||
>>> repr(WbUrl('20130102im_///example.com'))
|
||||
"('replay', '20130102', 'im_', 'http://example.com', '20130102im_/http://example.com')"
|
||||
|
@ -91,7 +91,7 @@ class WbUrl(BaseWbUrl):
|
||||
# Regexs
|
||||
# ======================
|
||||
QUERY_REGEX = re.compile('^(?:([\w\-:]+)/)?(\d*)[*-](\d*)/?(.+)$')
|
||||
REPLAY_REGEX = re.compile('^(\d*)([a-z]+_)?/{1,3}(.+)$')
|
||||
REPLAY_REGEX = re.compile('^(\d*)([a-z]+_|[$][a-z0-9:.-]+)?/{1,3}(.+)$')
|
||||
#LATEST_REPLAY_REGEX = re.compile('^\w_)')
|
||||
|
||||
DEFAULT_SCHEME = 'http://'
|
||||
|
Loading…
x
Reference in New Issue
Block a user