Commit b28423a5 authored by Ingo Meyer's avatar Ingo Meyer

Use a default `User-Agent` when downloading images (`Mozilla/5.0`)

parent e061ffed
......@@ -49,7 +49,7 @@ def load_and_convert_image(
tmp_dir = None
if image_is_remote:
image_url = image_filepath_or_url
response = requests.get(image_url)
response = requests.get(image_url, headers={"User-Agent": "Mozilla/5.0"})
response.raise_for_status()
image_content = response.content
if not convert_to_base64 or image_will_be_converted:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment