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
f317919c
Commit
f317919c
authored
Apr 07, 2018
by
Francesco Poldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
7fb4d83b
63502816
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
README.md
README.md
+1
-0
tweep.py
tweep.py
+9
-0
No files found.
README.md
View file @
f317919c
...
@@ -37,6 +37,7 @@ Command|Usage
...
@@ -37,6 +37,7 @@ Command|Usage
`--count`
|Display number Tweets scraped at the end of session.
`--count`
|Display number Tweets scraped at the end of session.
`--stats`
|Show number of replies, retweets, and likes.
`--stats`
|Show number of replies, retweets, and likes.
`--database`
|Store Tweets in a SQLite database
`--database`
|Store Tweets in a SQLite database
`-l`
|Serch for Tweets in a specific language
## Low-Hanging Fruit
## Low-Hanging Fruit
The
`--fruit`
feature will display Tweets that
*might*
contain sensitive info such as:
The
`--fruit`
feature will display Tweets that
*might*
contain sensitive info such as:
...
...
tweep.py
View file @
f317919c
...
@@ -93,6 +93,8 @@ async def getUrl(init):
...
@@ -93,6 +93,8 @@ async def getUrl(init):
url
+=
"&lang=en&include_available_features=1&include_entities=1&reset_"
url
+=
"&lang=en&include_available_features=1&include_entities=1&reset_"
url
+=
"error_state=false&src=typd&max_position={}&q="
.
format
(
init
)
url
+=
"error_state=false&src=typd&max_position={}&q="
.
format
(
init
)
if
arg
.
l
!=
None
:
url
=
url
.
replace
(
"lang=en"
,
"l={0.l}&lang=en"
.
format
(
arg
))
if
arg
.
u
!=
None
:
if
arg
.
u
!=
None
:
url
+=
"from
%3
A{0.u}"
.
format
(
arg
)
url
+=
"from
%3
A{0.u}"
.
format
(
arg
)
if
arg
.
g
!=
None
:
if
arg
.
g
!=
None
:
...
@@ -114,6 +116,10 @@ async def getUrl(init):
...
@@ -114,6 +116,10 @@ async def getUrl(init):
url
+=
"
%20
OR
%20
keybase"
url
+=
"
%20
OR
%20
keybase"
if
arg
.
verified
:
if
arg
.
verified
:
url
+=
"
%20
filter
%3
Averified"
url
+=
"
%20
filter
%3
Averified"
if
arg
.
to
:
url
+=
"
%20
to
%3
A{0.to}"
.
format
(
arg
)
if
arg
.
all
:
url
+=
"
%20
to
%3
A{0.all}
%20
OR
%20
from
%3
A{0.all}
%20
OR
%20
@{0.all}"
.
format
(
arg
)
return
url
return
url
...
@@ -501,6 +507,7 @@ if __name__ == "__main__":
...
@@ -501,6 +507,7 @@ if __name__ == "__main__":
ap
.
add_argument
(
"-u"
,
help
=
"User's Tweets you want to scrape."
)
ap
.
add_argument
(
"-u"
,
help
=
"User's Tweets you want to scrape."
)
ap
.
add_argument
(
"-s"
,
help
=
"Search for Tweets containing this word or phrase."
)
ap
.
add_argument
(
"-s"
,
help
=
"Search for Tweets containing this word or phrase."
)
ap
.
add_argument
(
"-g"
,
help
=
"Search for geocoded tweets."
)
ap
.
add_argument
(
"-g"
,
help
=
"Search for geocoded tweets."
)
ap
.
add_argument
(
"-l"
,
help
=
"Serch for Tweets in a specific language"
)
ap
.
add_argument
(
"-o"
,
help
=
"Save output to a file."
)
ap
.
add_argument
(
"-o"
,
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
(
"--year"
,
help
=
"Filter Tweets before specified year."
)
ap
.
add_argument
(
"--year"
,
help
=
"Filter Tweets before specified year."
)
...
@@ -518,6 +525,8 @@ if __name__ == "__main__":
...
@@ -518,6 +525,8 @@ if __name__ == "__main__":
ap
.
add_argument
(
"--count"
,
help
=
"Display number Tweets scraped at the end of session."
,
action
=
"store_true"
)
ap
.
add_argument
(
"--count"
,
help
=
"Display number Tweets scraped at the end of session."
,
action
=
"store_true"
)
ap
.
add_argument
(
"--stats"
,
help
=
"Show number of replies, retweets, and likes"
,
action
=
"store_true"
)
ap
.
add_argument
(
"--stats"
,
help
=
"Show number of replies, retweets, and likes"
,
action
=
"store_true"
)
ap
.
add_argument
(
"--database"
,
help
=
"Store tweets in the database"
)
ap
.
add_argument
(
"--database"
,
help
=
"Store tweets in the database"
)
ap
.
add_argument
(
"--to"
,
help
=
"Search Tweets to a user"
)
ap
.
add_argument
(
"--all"
,
help
=
"Search all Tweets associated with a user"
)
arg
=
ap
.
parse_args
()
arg
=
ap
.
parse_args
()
check
()
check
()
...
...
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