mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-02 22:07:58 +10:00
send ArchiveBox user agent to archive.org
This commit is contained in:
@@ -32,6 +32,7 @@ from config import (
|
|||||||
ANSI,
|
ANSI,
|
||||||
ARCHIVE_DIR,
|
ARCHIVE_DIR,
|
||||||
GIT_DOMAINS,
|
GIT_DOMAINS,
|
||||||
|
GIT_SHA,
|
||||||
)
|
)
|
||||||
from util import (
|
from util import (
|
||||||
check_dependencies,
|
check_dependencies,
|
||||||
@@ -404,6 +405,7 @@ def archive_dot_org(link_dir, link, timeout=TIMEOUT):
|
|||||||
'curl',
|
'curl',
|
||||||
'--location',
|
'--location',
|
||||||
'--head',
|
'--head',
|
||||||
|
'--user-agent', 'ArchiveBox/{} (+https://github.com/pirate/ArchiveBox/)'.format(GIT_SHA),
|
||||||
'--max-time', str(timeout),
|
'--max-time', str(timeout),
|
||||||
'--get',
|
'--get',
|
||||||
*(() if CHECK_SSL_VALIDITY else ('--insecure',)),
|
*(() if CHECK_SSL_VALIDITY else ('--insecure',)),
|
||||||
|
|||||||
Reference in New Issue
Block a user