aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-03-30 14:42:12 -0700
committerBryan Newbold <bnewbold@archive.org>2020-03-30 14:42:12 -0700
commit84edf7225bd9454abc598cdde36b14451ad1787d (patch)
tree1b9cc140474c57fb0042a200b2e46e2a3d4f35a3
parent5866adfc116cc779e869867ccebfe7adc70b4967 (diff)
downloadfatcat-covid19-84edf7225bd9454abc598cdde36b14451ad1787d.tar.gz
fatcat-covid19-84edf7225bd9454abc598cdde36b14451ad1787d.zip
add user-agent to deliver_file2disk
-rwxr-xr-xscripts/deliver_file2disk.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/deliver_file2disk.py b/scripts/deliver_file2disk.py
index f708b34..f54ecb3 100755
--- a/scripts/deliver_file2disk.py
+++ b/scripts/deliver_file2disk.py
@@ -78,7 +78,9 @@ class DeliverFatcatDisk:
self.disk_prefix = kwargs.get('disk_prefix', 'pdf/')
self.disk_suffix = kwargs.get('disk_suffix', '.pdf')
self.session = requests_retry_session()
-
+ self.session.headers.update({
+ 'User-Agent': 'Mozilla/5.0 fatcat.DeliverFatcatDisk',
+ })
def run(self, release_json_file):
sys.stderr.write("Ensuring all 256 base directories exist...\n")