Commit 8d0e579e authored by Cody Zacharias's avatar Cody Zacharias Committed by GitHub

Update tweep.py

parent 4e9c5db2
...@@ -194,16 +194,16 @@ async def outTweet(tweet): ...@@ -194,16 +194,16 @@ async def outTweet(tweet):
# Output section # Output section
if arg.o != None: if arg.o != None:
if arg.csv: if arg.csv:
# Write all variables scraped to CSV # Write all variables scraped to CSV
dat = [tweetid, date, time, timezone, username, text, replies, retweets, likes, hashtags] dat = [tweetid, date, time, timezone, username, text, replies, retweets, likes, hashtags]
with open(arg.o, "a", newline='') as csv_file: with open(arg.o, "a", newline='') as csv_file:
writer = csv.writer(csv_file, delimiter="|") writer = csv.writer(csv_file, delimiter="|")
writer.writerow(dat) writer.writerow(dat)
else: else:
# Writes or appends to a file. # Writes or appends to a file.
print(output, file=open(arg.o, "a")) print(output, file=open(arg.o, "a"))
return output return output
......
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