mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
webagg: default 'memento+' config to /timemap/link/ instead of /timemap/*/ for greater compatibility
This commit is contained in:
parent
91e45be75d
commit
0dbc803422
@ -386,11 +386,11 @@ class MementoIndexSource(BaseIndexSource):
|
||||
@classmethod
|
||||
def init_from_string(cls, value):
|
||||
if value.startswith('memento+'):
|
||||
return cls.from_timegate_url(value[8:], '*')
|
||||
return cls.from_timegate_url(value[8:], 'link')
|
||||
|
||||
# default to memento for any http url
|
||||
if value.startswith(('http://', 'https://')):
|
||||
return cls.from_timegate_url(value, '*')
|
||||
return cls.from_timegate_url(value, 'link')
|
||||
|
||||
|
||||
@classmethod
|
||||
|
@ -67,7 +67,7 @@ class TestAutoConfigApp(TempDirTests, BaseTestClass):
|
||||
sources = self._get_sources('rhiz')
|
||||
assert isinstance(sources['rhiz'], MementoIndexSource)
|
||||
assert sources['rhiz'].timegate_url == 'http://webenact.rhizome.org/all/{url}'
|
||||
assert sources['rhiz'].timemap_url == 'http://webenact.rhizome.org/all/timemap/*/{url}'
|
||||
assert sources['rhiz'].timemap_url == 'http://webenact.rhizome.org/all/timemap/link/{url}'
|
||||
assert sources['rhiz'].replay_url == 'http://webenact.rhizome.org/all/{timestamp}id_/{url}'
|
||||
|
||||
long_form_sources = self._get_sources('rhiz_long')
|
||||
|
@ -29,7 +29,7 @@ collections:
|
||||
index:
|
||||
type: memento
|
||||
timegate_url: http://webenact.rhizome.org/all/{url}
|
||||
timemap_url: http://webenact.rhizome.org/all/timemap/*/{url}
|
||||
timemap_url: http://webenact.rhizome.org/all/timemap/link/{url}
|
||||
replay_url: http://webenact.rhizome.org/all/{timestamp}id_/{url}
|
||||
|
||||
# many archives
|
||||
|
Loading…
x
Reference in New Issue
Block a user