mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
Update README.md
This commit is contained in:
parent
c60493bfdc
commit
bc104321c4
@ -12,6 +12,8 @@ It read records from WARC and ARC files and rewrites them in
|
|||||||
|
|
||||||
`http://<host>/<collection>/<timestamp>/<original url>`
|
`http://<host>/<collection>/<timestamp>/<original url>`
|
||||||
|
|
||||||
|
Optionally, custom text may also be inserted into the HTML head, which may render a banner or other overlay.
|
||||||
|
|
||||||
The Internet Archive Wayback Machine has urls of the form:
|
The Internet Archive Wayback Machine has urls of the form:
|
||||||
|
|
||||||
`http://web.archive.org/web/20131015120316/http://archive.org/`
|
`http://web.archive.org/web/20131015120316/http://archive.org/`
|
||||||
@ -41,7 +43,7 @@ and will be accessed by user at:
|
|||||||
|
|
||||||
`http://mywb.example.com:8080/mycoll/`
|
`http://mywb.example.com:8080/mycoll/`
|
||||||
|
|
||||||
and will load cdx from cdx server running at:
|
and will load cdx from [cdx server][1] running at:
|
||||||
|
|
||||||
`http://cdx.example.com/cdx`
|
`http://cdx.example.com/cdx`
|
||||||
|
|
||||||
@ -57,13 +59,13 @@ one could declare a `createWB()` method as follows:
|
|||||||
query = QueryHandler(indexreader.RemoteCDXServer('http://cdx.example.com/cdx'))
|
query = QueryHandler(indexreader.RemoteCDXServer('http://cdx.example.com/cdx'))
|
||||||
|
|
||||||
prefixes = [replay.PrefixResolver('http://warcs.example.com/servewarc/'),
|
prefixes = [replay.PrefixResolver('http://warcs.example.com/servewarc/'),
|
||||||
replay.PrefixResolver('http://warcs.example.com/anotherpath/')]
|
replay.PrefixResolver('http://warcs.example.com/anotherpath/')]
|
||||||
|
|
||||||
replay = replay.RewritingReplayHandler(resolvers = prefixes, archiveloader = aloader, headInsert = headInsert)
|
replay = replay.RewritingReplayHandler(resolvers = prefixes, archiveloader = aloader, headInsert = headInsert)
|
||||||
|
|
||||||
return ArchivalRequestRouter(
|
return ArchivalRequestRouter(
|
||||||
{
|
{
|
||||||
'mycoll': [WBHandler(query, replay)],
|
'mycoll': [replay.WBHandler(query, replay)],
|
||||||
},
|
},
|
||||||
hostpaths = ['http://mywb.example.com:8080/'])
|
hostpaths = ['http://mywb.example.com:8080/'])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user