Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Twint
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Twint
Commits
edb00491
Commit
edb00491
authored
Mar 05, 2019
by
Francesco Poldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Custom_query
parent
14e0bf7a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
0 deletions
+5
-0
twint/cli.py
twint/cli.py
+2
-0
twint/config.py
twint/config.py
+1
-0
twint/url.py
twint/url.py
+2
-0
No files found.
twint/cli.py
View file @
edb00491
...
...
@@ -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
...
...
twint/config.py
View file @
edb00491
...
...
@@ -63,3 +63,4 @@ class Config:
Hide_output
=
False
Get_replies
=
False
Near
=
""
Custom_query
=
""
\ No newline at end of file
twint/url.py
View file @
edb00491
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment