add 'lwp-request' to non-html user agents

this should make /usr/bin/GET from libwww perl output plain text instead of HTML
pull/24/head
Christian Garbs 9 years ago
parent 80b28dbaee
commit eb2817a20e

@ -225,7 +225,7 @@ def wttr(location = None):
user_agent = request.headers.get('User-Agent').lower() user_agent = request.headers.get('User-Agent').lower()
html_output = True 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 html_output = False
if location == ':help': if location == ':help':

Loading…
Cancel
Save