We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents af092b8 + 60e928d commit b16c7b8Copy full SHA for b16c7b8
1 file changed
library/jma_amesh.py
@@ -14,6 +14,7 @@
14
15
import requests
16
from PIL import Image, ImageEnhance
17
+from slackbot_settings import VERSION
18
19
20
@dataclass
@@ -94,7 +95,15 @@ def get_tile_image(
94
95
)
96
res = []
97
for url in urls:
- res.append(Image.open(BytesIO(requests.get(url).content)))
98
+ res.append(
99
+ Image.open(
100
+ BytesIO(
101
+ requests.get(
102
+ url, headers={"user-agent": f"hato-bot/{VERSION}"}
103
+ ).content
104
+ )
105
106
107
dst_image = Image.new(
108
"RGBA", (256 * (2 * around_tiles + 1), 256 * (2 * around_tiles + 1))
109
0 commit comments