Commit 4ba511bb authored by Francesco Poldi's avatar Francesco Poldi

Updated args check, removed old args and defaults, updated elasticsearch

parent 2540fb48
......@@ -29,14 +29,14 @@ def check(args):
if args.userid:
error("Contradicting Args",
"--userid and -u cannot be used together.")
else:
if args.search is None:
error("Error", "Please use at least -u or -s.")
if args.output is None:
if args.csv:
error("Error", "Please specify an output file (Example: -o file.csv).")
elif args.json:
error("Error", "Please specify an output file (Example: -o file.json).")
if args.hostname:
if args.Database is None or args.DB_user is None or args.DB_pwd is None:
error("Error", "Please specify database name, user and password")
def loadUserList(ul, _type):
""" Concatenate users
......
......@@ -2,7 +2,7 @@ class Config:
Username = None
User_id = None
Search = None
Geo = None
Geo = ""
Location = False
Near = None
Lang = None
......
......@@ -242,9 +242,9 @@ def Tweet(Tweet, config):
"near": config.Near
}
}
if config.Near:
if config.Near or config.Geo:
if not _is_near_def:
_is_near_def = getLocation(config.Near, near=True)
_is_near_def = getLocation(config.Near + config.Geo, near=True)
if _near:
j_data["_source"].update({"geo_near": _near})
if Tweet.place:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment