mirror of
https://github.com/chubin/wttr.in.git
synced 2024-10-05 09:52:13 +02:00
Merge pull request #24 from mmitch/master
add 'lwp-request' to non-html user agents
This commit is contained in:
commit
5a7f09d8b9
@ -225,7 +225,7 @@ def wttr(location = None):
|
||||
user_agent = request.headers.get('User-Agent').lower()
|
||||
|
||||
html_output = True
|
||||
if 'curl' in user_agent or 'wget' in user_agent or 'httpie' in user_agent:
|
||||
if 'curl' in user_agent or 'wget' in user_agent or 'httpie' in user_agent or 'lwp-request' in user_agent:
|
||||
html_output = False
|
||||
|
||||
if location == ':help':
|
||||
|
Loading…
Reference in New Issue
Block a user