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
c0d07e9f
Commit
c0d07e9f
authored
Feb 01, 2018
by
Cody Zacharias
Committed by
GitHub
Feb 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tweep.py
parent
cdff8e7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
tweep.py
tweep.py
+9
-1
No files found.
tweep.py
View file @
c0d07e9f
...
...
@@ -5,6 +5,7 @@ import argparse
import
aiohttp
import
asyncio
import
async_timeout
import
csv
import
datetime
import
json
import
sys
...
...
@@ -94,7 +95,13 @@ async def getTweets(init):
output
=
"{} {} {} {} <{}> {}"
.
format
(
tweetid
,
date
,
time
,
timezone
,
username
,
text
)
if
arg
.
o
!=
None
:
print
(
output
,
file
=
open
(
arg
.
o
,
"a"
))
if
arg
.
csv
:
dat
=
[
tweetid
,
date
,
time
,
timezone
,
username
,
text
]
with
open
(
arg
.
o
,
"a"
,
newline
=
''
)
as
csv_file
:
writer
=
csv
.
writer
(
csv_file
,
delimiter
=
","
)
writer
.
writerow
(
dat
)
else
:
print
(
output
,
file
=
open
(
arg
.
o
,
"a"
))
print
(
output
)
...
...
@@ -120,6 +127,7 @@ if __name__ == "__main__":
ap
.
add_argument
(
"--tweets"
,
help
=
"Display Tweets only."
,
action
=
"store_true"
)
ap
.
add_argument
(
"--verified"
,
help
=
"Display Tweets only from verified users (Use with -s)."
,
action
=
"store_true"
)
ap
.
add_argument
(
"--users"
,
help
=
"Display users only (Use with -s)."
,
action
=
"store_true"
)
ap
.
add_argument
(
"--csv"
,
help
=
"Write as .csv file."
,
action
=
"store_true"
)
arg
=
ap
.
parse_args
()
if
arg
.
u
is
not
None
:
...
...
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