diff --git a/archivebox/core/views.py b/archivebox/core/views.py
index f4a976ea..801676b3 100644
--- a/archivebox/core/views.py
+++ b/archivebox/core/views.py
@@ -61,7 +61,7 @@ class SnapshotView(View):
try:
try:
- snapshot = Snapshot.objects.get(timestamp=slug)
+ snapshot = Snapshot.objects.get(Q(timestamp=slug) | Q(id__startswith=slug))
response = static.serve(request, archivefile, document_root=snapshot.link_dir, show_indexes=True)
response["Link"] = f'<{snapshot.url}>; rel="canonical"'
return response
@@ -76,7 +76,7 @@ class SnapshotView(View):
format_html(
(
'
'
- 'No Snapshots match the given timestamp or UUID: {}
'
+ 'No Snapshot directories match the given timestamp or UUID: {}
'
'You can add a new Snapshot, or return to the Main Index'
''
),
@@ -119,18 +119,21 @@ class SnapshotView(View):
format_html(
(
'
'
- 'Snapshot {}
exists but no file or folder /{}
exists within.
'
- 'Maybe this output type is not availabe for this URL,
or the archiving process has not completed for this Snapshot yet?
'
- '# run this cmd to finish archiving this Snapshot
archivebox update -t timestamp {}
'
- 'You can go back to the Snapshot {}
detail page, or return to the Main Index'
+ f'Snapshot [{snapshot.timestamp}]
exists in DB, but resource {snapshot.timestamp}/'
+ '{}'
+ f'
does not exist in snapshot dir yet.
'
+ 'Maybe this resource type is not availabe for this Snapshot,
or the archiving process has not completed yet?
'
+ f'# run this cmd to finish archiving this Snapshot
archivebox update -t timestamp {snapshot.timestamp}
'
+ ''
+ '
Next steps:'
+ f'- list all the
Snapshot files .*
'
+ f'- view the
Snapshot ./index.html
'
+ f'- go to the
Snapshot admin to edit
'
+ f'- go to the
Snapshot actions to re-archive
'
+ '- or return to
the main index... '
''
),
- snapshot.timestamp,
- snapshot.timestamp,
archivefile,
- snapshot.timestamp,
- snapshot.timestamp,
- snapshot.timestamp,
),
content_type="text/html",
status=404,
@@ -140,7 +143,7 @@ class SnapshotView(View):
try:
# try exact match on full url first
snapshot = Snapshot.objects.get(
- Q(url='http://' + path) | Q(url='https://' + path)
+ Q(url='http://' + path) | Q(url='https://' + path) | Q(id__startswith=path)
)
except Snapshot.DoesNotExist:
# fall back to match on exact base_url
diff --git a/archivebox/templates/core/snapshot.html b/archivebox/templates/core/snapshot.html
index beb0c683..94849b80 100644
--- a/archivebox/templates/core/snapshot.html
+++ b/archivebox/templates/core/snapshot.html
@@ -340,7 +340,7 @@
WARC |
Media |
Git |
- Favicon |
+ Actions |
Admin |
See all files...