|
@@ -33,6 +33,7 @@ from config import (
|
|
|
WGET_USER_AGENT,
|
|
WGET_USER_AGENT,
|
|
|
CHECK_SSL_VALIDITY,
|
|
CHECK_SSL_VALIDITY,
|
|
|
COOKIES_FILE,
|
|
COOKIES_FILE,
|
|
|
|
|
+ WGET_AUTO_COMPRESSION
|
|
|
)
|
|
)
|
|
|
from util import (
|
|
from util import (
|
|
|
domain,
|
|
domain,
|
|
@@ -224,10 +225,10 @@ def fetch_wget(link_dir, link, timeout=TIMEOUT):
|
|
|
'--backup-converted',
|
|
'--backup-converted',
|
|
|
'--span-hosts',
|
|
'--span-hosts',
|
|
|
'--no-parent',
|
|
'--no-parent',
|
|
|
- '--compression=auto',
|
|
|
|
|
'-e', 'robots=off',
|
|
'-e', 'robots=off',
|
|
|
'--restrict-file-names=unix',
|
|
'--restrict-file-names=unix',
|
|
|
'--timeout={}'.format(timeout),
|
|
'--timeout={}'.format(timeout),
|
|
|
|
|
+ *(('--compression=auto',) if WGET_AUTO_COMPRESSION else ()),
|
|
|
*(() if FETCH_WARC else ('--timestamping',)),
|
|
*(() if FETCH_WARC else ('--timestamping',)),
|
|
|
*(('--warc-file={}'.format(warc_path),) if FETCH_WARC else ()),
|
|
*(('--warc-file={}'.format(warc_path),) if FETCH_WARC else ()),
|
|
|
*(('--page-requisites',) if FETCH_WGET_REQUISITES else ()),
|
|
*(('--page-requisites',) if FETCH_WGET_REQUISITES else ()),
|