Skip to content

Commit

Permalink
feat: add more headers [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
null8626 committed Oct 28, 2024
1 parent 8ff1b0e commit 3aa8350
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python_weather/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ async def get(
while True:
try:
async with self.__session.get(
f'https://{subdomain}wttr.in/{quote_plus(location)}?format=j1'
f'https://{subdomain}wttr.in/{quote_plus(location)}?format=j1',
headers={
'Content-Type': 'application/json',
'User-Agent': 'python_weather (https://github.com/null8626/python-weather 2.0.7) Python/',
},
) as resp:
resp.raise_for_status()

Expand Down

0 comments on commit 3aa8350

Please sign in to comment.