Commit 51ecfe59 authored by Cody Zacharias's avatar Cody Zacharias Committed by GitHub

Minor adjustments

Made hashtag display indicated by arg rather than being displayed by default.
parent 1c2819c5
...@@ -8,9 +8,8 @@ import async_timeout ...@@ -8,9 +8,8 @@ import async_timeout
import csv import csv
import datetime import datetime
import json import json
import sys
import re import re
import sys
async def getUrl(init): async def getUrl(init):
if init == -1: if init == -1:
...@@ -95,7 +94,9 @@ async def getTweets(init): ...@@ -95,7 +94,9 @@ async def getTweets(init):
elif arg.tweets: elif arg.tweets:
output = tweets output = tweets
else: else:
output = "{} {} {} {} <{}> {} {}".format(tweetid, date, time, timezone, username, text, hashtags) output = "{} {} {} {} <{}> {}".format(tweetid, date, time, timezone, username, text)
if arg.hashtags:
output+= " {}".format(hashtags)
if arg.o != None: if arg.o != None:
if arg.csv: if arg.csv:
...@@ -131,6 +132,7 @@ if __name__ == "__main__": ...@@ -131,6 +132,7 @@ if __name__ == "__main__":
ap.add_argument("--verified", help="Display Tweets only from verified users (Use with -s).", 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("--users", help="Display users only (Use with -s).", action="store_true")
ap.add_argument("--csv", help="Write as .csv file.", action="store_true") ap.add_argument("--csv", help="Write as .csv file.", action="store_true")
ap.add_argument("--hashtags", help="Output hashtags in seperate column.", action="store_true")
arg = ap.parse_args() arg = ap.parse_args()
if arg.u is not None: if arg.u is not None:
......
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