Commit 1a4d4a67 authored by Francesco Poldi's avatar Francesco Poldi

Removed timeDelta arg and attribute

parent 94d34dd3
...@@ -11,7 +11,6 @@ Copyright (c) 2018 The Twint Project ...@@ -11,7 +11,6 @@ Copyright (c) 2018 The Twint Project
import sys import sys
import os import os
import argparse import argparse
from datetime import timedelta
from . import run from . import run
from . import config from . import config
...@@ -63,12 +62,6 @@ def loadUserList(ul, _type): ...@@ -63,12 +62,6 @@ def loadUserList(ul, _type):
return userlist return userlist
def getTimeDelta(arg):
if arg:
return timedelta(days=int(arg))
return None
def initialize(args): def initialize(args):
""" Set default values for config from args """ Set default values for config from args
""" """
...@@ -82,7 +75,6 @@ def initialize(args): ...@@ -82,7 +75,6 @@ def initialize(args):
c.Lang = args.lang c.Lang = args.lang
c.Output = args.output c.Output = args.output
c.Elasticsearch = args.elasticsearch c.Elasticsearch = args.elasticsearch
c.Timedelta = getTimeDelta(args.timedelta)
c.Year = args.year c.Year = args.year
c.Since = args.since c.Since = args.since
c.Until = args.until c.Until = args.until
...@@ -147,7 +139,6 @@ def options(): ...@@ -147,7 +139,6 @@ def options():
ap.add_argument("-l", "--lang", help="Search for Tweets in a specific language.") ap.add_argument("-l", "--lang", help="Search for Tweets in a specific language.")
ap.add_argument("-o", "--output", help="Save output to a file.") ap.add_argument("-o", "--output", help="Save output to a file.")
ap.add_argument("-es", "--elasticsearch", help="Index to Elasticsearch.") ap.add_argument("-es", "--elasticsearch", help="Index to Elasticsearch.")
ap.add_argument("-t", "--timedelta", help="Time interval for every request.")
ap.add_argument("--year", help="Filter Tweets before specified year.") ap.add_argument("--year", help="Filter Tweets before specified year.")
ap.add_argument("--since", help="Filter Tweets sent since date (Example: \"2017-12-27 20:30:15\" or 2017-12-27).", ap.add_argument("--since", help="Filter Tweets sent since date (Example: \"2017-12-27 20:30:15\" or 2017-12-27).",
metavar="DATE") metavar="DATE")
......
...@@ -8,7 +8,6 @@ class Config: ...@@ -8,7 +8,6 @@ class Config:
Lang = None Lang = None
Output = None Output = None
Elasticsearch = None Elasticsearch = None
Timedelta = None
Year = None Year = None
Since = None Since = None
Until = None Until = None
......
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