We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f797801 commit d6b41b6Copy full SHA for d6b41b6
python/pyarrow/util.py
@@ -231,8 +231,9 @@ def _break_traceback_cycle_from_frame(frame):
231
232
233
def _download_urllib(url, out_path):
234
- from urllib.request import urlopen
235
- with urlopen(url) as response:
+ from urllib.request import urlopen, Request
+ req = Request(url, headers={'User-Agent': 'pyarrow'})
236
+ with urlopen(req) as response:
237
with open(out_path, 'wb') as f:
238
f.write(response.read())
239
0 commit comments