Commit d20a2ed6 authored by Cody Zacharias's avatar Cody Zacharias

Replace --fruit with --email and --phone. Fix #289

parent 652fe03a
...@@ -62,7 +62,7 @@ A few simple examples to help you understand the basics: ...@@ -62,7 +62,7 @@ A few simple examples to help you understand the basics:
- `python3 Twint.py -u username --since 2015-12-20` - Collect Tweets that were tweeted since 2015-12-20. - `python3 Twint.py -u username --since 2015-12-20` - Collect Tweets that were tweeted since 2015-12-20.
- `python3 Twint.py -u username -o file.txt` - Scrape Tweets and save to file.txt. - `python3 Twint.py -u username -o file.txt` - Scrape Tweets and save to file.txt.
- `python3 Twint.py -u username -o file.csv --csv` - Scrape Tweets and save as a csv file. - `python3 Twint.py -u username -o file.csv --csv` - Scrape Tweets and save as a csv file.
- `python3 Twint.py -u username --fruit` - Show Tweets with low-hanging fruit. - `python3 Twint.py -u username --email --phone` - Show Tweets that might have phone numbers or email addresses.
- `python3 Twint.py -s "Donald Trump" --verified` - Display Tweets by verified users that Tweeted about Donald Trump. - `python3 Twint.py -s "Donald Trump" --verified` - Display Tweets by verified users that Tweeted about Donald Trump.
- `python3 Twint.py -g="48.880048,2.385939,1km" -o file.csv --csv` - Scrape Tweets from a radius of 1km around a place in Paris and export them to a csv file. - `python3 Twint.py -g="48.880048,2.385939,1km" -o file.csv --csv` - Scrape Tweets from a radius of 1km around a place in Paris and export them to a csv file.
- `python3 Twint.py -u username -es localhost:9200` - Output Tweets to Elasticsearch - `python3 Twint.py -u username -es localhost:9200` - Output Tweets to Elasticsearch
......
...@@ -69,7 +69,8 @@ def initialize(args): ...@@ -69,7 +69,8 @@ def initialize(args):
c.Year = args.year c.Year = args.year
c.Since = args.since c.Since = args.since
c.Until = args.until c.Until = args.until
c.Fruit = args.fruit c.Email = args.email
c.Phone = args.phone
c.Verified = args.verified c.Verified = args.verified
c.Store_csv = args.csv c.Store_csv = args.csv
c.Store_json = args.json c.Store_json = args.json
...@@ -122,7 +123,8 @@ def options(): ...@@ -122,7 +123,8 @@ def options():
ap.add_argument("--year", help="Filter Tweets before specified year.") ap.add_argument("--year", help="Filter Tweets before specified year.")
ap.add_argument("--since", help="Filter Tweets sent since date (Example: 2017-12-27).") ap.add_argument("--since", help="Filter Tweets sent since date (Example: 2017-12-27).")
ap.add_argument("--until", help="Filter Tweets sent until date (Example: 2017-12-27).") ap.add_argument("--until", help="Filter Tweets sent until date (Example: 2017-12-27).")
ap.add_argument("--fruit", help="Display 'low-hanging-fruit' Tweets.", action="store_true") ap.add_argument("--email", help="Filter Tweets that might have email addresses", action="store_true")
ap.add_argument("--phone", help="Filter Tweets that might have phone numbers", action="store_true")
ap.add_argument("--verified", help="Display Tweets only from verified users (Use with -s).", ap.add_argument("--verified", help="Display Tweets only from verified users (Use with -s).",
action="store_true") 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")
......
...@@ -12,7 +12,8 @@ class Config: ...@@ -12,7 +12,8 @@ class Config:
Year = None Year = None
Since = None Since = None
Until = None Until = None
Fruit = False Email = False
Phone = False
Verified = False Verified = False
Store_csv = False Store_csv = False
Store_json = False Store_json = False
......
...@@ -82,11 +82,11 @@ async def Search(config, init): ...@@ -82,11 +82,11 @@ async def Search(config, init):
q += f" since:{config.Since}" q += f" since:{config.Since}"
if config.Until: if config.Until:
q += f" until:{config.Until}" q += f" until:{config.Until}"
if config.Fruit: if config.Email:
url += ' "myspace.com" OR "last.fm" OR' q += ' "mail" OR "email" OR'
url += ' "mail" OR "email" OR "gmail" OR "e-mail"' q += ' "gmail" OR "e-mail"'
# url += "%20OR%20%22phone%22%20OR%20%22call%20me%22%20OR%20%22text%20me%22" if config.Phone:
# url += "%20OR%20%22keybase%22" q += ' "phone" OR "call me" OR "text me"'
if config.Verified: if config.Verified:
q += " filter:verified" q += " filter:verified"
if config.To: if config.To:
......
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