Browse Source

Added curl params

Angel Rey 5 years ago
parent
commit
7fd7dced9a
1 changed files with 5 additions and 4 deletions
  1. 5 4
      archivebox/extractors/headers.py

+ 5 - 4
archivebox/extractors/headers.py

@@ -46,10 +46,11 @@ def save_headers(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEOUT)
 
     cmd = [
         CURL_BINARY,
-        '-s',
-        '-I',
-        '-X',
-        '-D',
+        '--silent',
+        '--max-time', str(timeout),
+        '--location',
+        '--compressed',
+        '--head',
         *(['--user-agent', '{}'.format(CURL_USER_AGENT)] if CURL_USER_AGENT else []),
         *([] if CHECK_SSL_VALIDITY else ['--insecure']),
         link.url,