Commit edb00491 authored by Francesco Poldi's avatar Francesco Poldi

Added Custom_query

parent 14e0bf7a
......@@ -106,6 +106,7 @@ def initialize(args):
c.Proxy_type = args.proxy_type
c.Retweets = args.retweets
c.Get_replies = args.get_replies
c.Custom_query = args.custom_query
return c
def options():
......@@ -187,6 +188,7 @@ def options():
ap.add_argument("-pc", "--pandas-clean",
help="Automatically clean Pandas dataframe at every scrape.")
ap.add_argument("--get-replies", help="All replies to the tweet.", action="store_true")
ap.add_argument("-cq", "--custom-query", help="Custom search query.")
args = ap.parse_args()
return args
......
......@@ -63,3 +63,4 @@ class Config:
Hide_output = False
Get_replies = False
Near = ""
Custom_query = ""
\ No newline at end of file
......@@ -101,6 +101,8 @@ async def Search(config, init):
q += " filter:media"
if config.Replies:
q += " filter:replies"
if config.Custom_query:
q = config.Custom_query
params.append(("q", q))
return url, params
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