Commit 155acf70 authored by Cody Zacharias's avatar Cody Zacharias Committed by GitHub

Added csv encoding

parent 41967ed6
...@@ -180,7 +180,7 @@ async def outTweet(tweet): ...@@ -180,7 +180,7 @@ async def outTweet(tweet):
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='', encoding="utf-8") as csv_file:
writer = csv.writer(csv_file, delimiter="|") writer = csv.writer(csv_file, delimiter="|")
writer.writerow(dat) writer.writerow(dat)
else: else:
......
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