diff --git a/archivebox/core/views.py b/archivebox/core/views.py index 539d029c..f4a976ea 100644 --- a/archivebox/core/views.py +++ b/archivebox/core/views.py @@ -159,11 +159,13 @@ class SnapshotView(View): format_html( ( '



' - 'No Snapshots match the given url: {}

' - 'You can add a new Snapshot, or return to the Main Index' + 'No Snapshots match the given url: {}


' + 'Return to the Main Index, or:

' + '+ Add a new Snapshot for {}

' '
' ), base_url(path), + path if '://' in path else f'https://{path}', path, ), content_type="text/html", @@ -241,9 +243,9 @@ class AddView(UserPassesTestMixin, FormView): if self.request.method == 'GET': url = self.request.GET.get('url', None) if url: - return {'url': url} - else: - return super().get_initial() + return {'url': url if '://' in url else f'https://{url}'} + + return super().get_initial() def test_func(self): return PUBLIC_ADD_VIEW or self.request.user.is_authenticated