1
0
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:
Ilya Kreymer 2017-02-26 12:18:31 -08:00
parent 91e45be75d
commit 0dbc803422
3 changed files with 4 additions and 4 deletions

View File

@ -386,11 +386,11 @@ class MementoIndexSource(BaseIndexSource):
@classmethod @classmethod
def init_from_string(cls, value): def init_from_string(cls, value):
if value.startswith('memento+'): 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 # default to memento for any http url
if value.startswith(('http://', 'https://')): if value.startswith(('http://', 'https://')):
return cls.from_timegate_url(value, '*') return cls.from_timegate_url(value, 'link')
@classmethod @classmethod

View File

@ -67,7 +67,7 @@ class TestAutoConfigApp(TempDirTests, BaseTestClass):
sources = self._get_sources('rhiz') sources = self._get_sources('rhiz')
assert isinstance(sources['rhiz'], MementoIndexSource) assert isinstance(sources['rhiz'], MementoIndexSource)
assert sources['rhiz'].timegate_url == 'http://webenact.rhizome.org/all/{url}' 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}' assert sources['rhiz'].replay_url == 'http://webenact.rhizome.org/all/{timestamp}id_/{url}'
long_form_sources = self._get_sources('rhiz_long') long_form_sources = self._get_sources('rhiz_long')

View File

@ -29,7 +29,7 @@ collections:
index: index:
type: memento type: memento
timegate_url: http://webenact.rhizome.org/all/{url} 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} replay_url: http://webenact.rhizome.org/all/{timestamp}id_/{url}
# many archives # many archives