diff --git a/lib/globals.py b/lib/globals.py index a54d809..aab7ccf 100644 --- a/lib/globals.py +++ b/lib/globals.py @@ -3,7 +3,7 @@ import os MYDIR = os.path.abspath(os.path.dirname( os.path.dirname('__file__') )) -GEOLITE = os.path.join( MYDIR, "GeoLite2-City.mmdb" ) +GEOLITE = os.path.join(MYDIR, 'data', "GeoLite2-City.mmdb") WEGO = "/home/igor/go/bin/we-lang" PYPHOON = "/home/igor/wttr.in/pyphoon/bin/pyphoon-lolcat" @@ -33,6 +33,18 @@ MALFORMED_RESPONSE_HTML_PAGE = open(os.path.join(STATIC, 'malformed-response.htm LISTEN_HOST = "" LISTEN_PORT = 8002 +PLAIN_TEXT_AGENTS = [ + "curl", + "httpie", + "lwp-request", + "wget", + "python-requests" +] + +PLAIN_TEXT_PAGES = [':help', ':bash.function', ':translation'] + +IP2LOCATION_KEY = '' + def error(text): if not text.startswith('Too many queries'): print text