diff --git a/library/jma_amesh.py b/library/jma_amesh.py index 22d5c04359..219aaad0d1 100644 --- a/library/jma_amesh.py +++ b/library/jma_amesh.py @@ -14,6 +14,7 @@ import requests from PIL import Image, ImageEnhance +from slackbot_settings import VERSION @dataclass @@ -94,7 +95,15 @@ def get_tile_image( ) res = [] for url in urls: - res.append(Image.open(BytesIO(requests.get(url).content))) + res.append( + Image.open( + BytesIO( + requests.get( + url, headers={"user-agent": f"hato-bot/{VERSION}"} + ).content + ) + ) + ) dst_image = Image.new( "RGBA", (256 * (2 * around_tiles + 1), 256 * (2 * around_tiles + 1)) )