Commit f317919c authored by Francesco Poldi's avatar Francesco Poldi

Merge remote-tracking branch 'origin/master'

parents 7fb4d83b 63502816
......@@ -37,6 +37,7 @@ Command|Usage
`--count`|Display number Tweets scraped at the end of session.
`--stats`|Show number of replies, retweets, and likes.
`--database`|Store Tweets in a SQLite database
`-l`|Serch for Tweets in a specific language
## Low-Hanging Fruit
The `--fruit` feature will display Tweets that *might* contain sensitive info such as:
......
......@@ -93,6 +93,8 @@ async def getUrl(init):
url+= "&lang=en&include_available_features=1&include_entities=1&reset_"
url+= "error_state=false&src=typd&max_position={}&q=".format(init)
if arg.l != None:
url = url.replace("lang=en", "l={0.l}&lang=en".format(arg))
if arg.u != None:
url+= "from%3A{0.u}".format(arg)
if arg.g != None:
......@@ -114,6 +116,10 @@ async def getUrl(init):
url+= "%20OR%20keybase"
if arg.verified:
url+= "%20filter%3Averified"
if arg.to:
url+= "%20to%3A{0.to}".format(arg)
if arg.all:
url+= "%20to%3A{0.all}%20OR%20from%3A{0.all}%20OR%20@{0.all}".format(arg)
return url
......@@ -501,6 +507,7 @@ if __name__ == "__main__":
ap.add_argument("-u", help="User's Tweets you want to scrape.")
ap.add_argument("-s", help="Search for Tweets containing this word or phrase.")
ap.add_argument("-g", help="Search for geocoded tweets.")
ap.add_argument("-l", help="Serch for Tweets in a specific language")
ap.add_argument("-o", help="Save output to a file.")
ap.add_argument("-es", "--elasticsearch", help="Index to Elasticsearch")
ap.add_argument("--year", help="Filter Tweets before specified year.")
......@@ -518,6 +525,8 @@ if __name__ == "__main__":
ap.add_argument("--count", help="Display number Tweets scraped at the end of session.", action="store_true")
ap.add_argument("--stats", help="Show number of replies, retweets, and likes", action="store_true")
ap.add_argument("--database", help="Store tweets in the database")
ap.add_argument("--to", help="Search Tweets to a user")
ap.add_argument("--all", help="Search all Tweets associated with a user")
arg = ap.parse_args()
check()
......
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