mirror of
https://github.com/chubin/wttr.in
synced 2024-11-14 16:17:19 +00:00
User-Agent can be omited
This commit is contained in:
parent
ef3cb4dd7c
commit
8e1479f6ba
1 changed files with 1 additions and 1 deletions
|
@ -322,7 +322,7 @@ def send_malformed():
|
|||
@app.route("/<string:location>")
|
||||
def wttr(location = None):
|
||||
|
||||
user_agent = request.headers.get('User-Agent').lower()
|
||||
user_agent = request.headers.get('User-Agent', '').lower()
|
||||
|
||||
if any(agent in user_agent for agent in PLAIN_TEXT_AGENTS):
|
||||
html_output = False
|
||||
|
|
Loading…
Reference in a new issue