Commit 51069f3e authored by Francesco Poldi's avatar Francesco Poldi

Added filter_retweets

parent 33d288b4
......@@ -122,6 +122,7 @@ def initialize(args):
c.Links = args.links
c.Source = args.source
c.Members_list = args.members_list
c.Filter_retweets = args.filter_retweets
return c
def options():
......@@ -215,6 +216,7 @@ def options():
" you will get both tweets that might contain links or not.")
ap.add_argument("--source", help="Filter the tweets for specific source client.")
ap.add_argument("--members-list", help="Filter the tweets sent by users in a given list.")
ap.add_argument("-fr", "--filter-retweets", help="Exclude retweets from the results.", action="store_true")
args = ap.parse_args()
return args
......
......@@ -71,4 +71,5 @@ class Config:
Min_replies = 0
Links = None
Source = None
Members_list = None
\ No newline at end of file
Members_list = None
Filter_retweets = False
\ No newline at end of file
......@@ -125,6 +125,8 @@ async def Search(config, init):
q += f" source:\"{config.Source}\""
if config.Members_list:
q += f" list:{config.Members_list}"
if config.Filter_retweets:
q += f" exclude:nativeretweets exclude:retweets"
if config.Custom_query:
q = config.Custom_query
......
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