1
0
Fork 0
mirror of synced 2024-06-05 03:54:34 +12:00

add headers.json and fix relative singlefile path resolving for sonic

This commit is contained in:
Nick Sweeting 2021-01-30 21:58:38 -05:00
parent c089501073
commit 24e24934f7
2 changed files with 3 additions and 1 deletions

View file

@ -427,6 +427,7 @@ class Link:
'archive_org_path': 'https://web.archive.org/web/{}'.format(self.base_url),
'git_path': 'git/',
'media_path': 'media/',
'headers_path': 'headers.json',
}
if self.is_static:
# static binary files like PDF and images are handled slightly differently.

View file

@ -34,10 +34,11 @@ def get_indexable_content(results: QuerySet):
return []
# This should come from a plugin interface
# TODO: banish this duplication and get these from the extractor file
if method == 'readability':
return get_file_result_content(res, 'content.txt')
elif method == 'singlefile':
return get_file_result_content(res, '')
return get_file_result_content(res,'',use_pwd=True)
elif method == 'dom':
return get_file_result_content(res,'',use_pwd=True)
elif method == 'wget':