From fcc7b792729e58938239af6e37d0238c0d610a9f Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Fri, 5 Oct 2018 20:19:27 +0200 Subject: [PATCH] new global variables --- lib/globals.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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