Commit 63502816 authored by Cody Zacharias's avatar Cody Zacharias Committed by GitHub

Merge pull request #61 from 4sakura/feature/language_selection

implement issue #53 language selection
parents 9f32ec6f e7cf1030
...@@ -37,6 +37,7 @@ Command|Usage ...@@ -37,6 +37,7 @@ Command|Usage
`--count`|Display number Tweets scraped at the end of session. `--count`|Display number Tweets scraped at the end of session.
`--stats`|Show number of replies, retweets, and likes. `--stats`|Show number of replies, retweets, and likes.
`--database`|Store Tweets in a SQLite database `--database`|Store Tweets in a SQLite database
`-l`|Serch for Tweets in a specific language
## Low-Hanging Fruit ## Low-Hanging Fruit
The `--fruit` feature will display Tweets that *might* contain sensitive info such as: The `--fruit` feature will display Tweets that *might* contain sensitive info such as:
......
...@@ -93,6 +93,8 @@ async def getUrl(init): ...@@ -93,6 +93,8 @@ async def getUrl(init):
url+= "&lang=en&include_available_features=1&include_entities=1&reset_" url+= "&lang=en&include_available_features=1&include_entities=1&reset_"
url+= "error_state=false&src=typd&max_position={}&q=".format(init) 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: if arg.u != None:
url+= "from%3A{0.u}".format(arg) url+= "from%3A{0.u}".format(arg)
if arg.g != None: if arg.g != None:
...@@ -491,6 +493,7 @@ if __name__ == "__main__": ...@@ -491,6 +493,7 @@ if __name__ == "__main__":
ap.add_argument("-u", help="User's Tweets you want to scrape.") 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("-s", help="Search for Tweets containing this word or phrase.")
ap.add_argument("-g", help="Search for geocoded tweets.") 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("-o", help="Save output to a file.")
ap.add_argument("-es", "--elasticsearch", help="Index to Elasticsearch") ap.add_argument("-es", "--elasticsearch", help="Index to Elasticsearch")
ap.add_argument("--year", help="Filter Tweets before specified year.") ap.add_argument("--year", help="Filter Tweets before specified year.")
......
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