this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

twitter-to-sqlite followers --auth option

+9 -6
+4 -2
README.md
··· 42 42 43 43 The following command pulls your followers and saves them in a SQLite database file called `twitter.db`: 44 44 45 - $ twitter-to-sqlite followers twitter.db auth.json 45 + $ twitter-to-sqlite followers twitter.db 46 46 47 - The `auth.json` path argument is optional - if you omit it the script will look for `auth.json` in your current directory. 47 + It assumes there is an `auth.json` file in the current director. You can provide the path to your `auth.json` file using `-a`: 48 + 49 + $ twitter-to-sqlite followers twitter.db -a /path/to/auth.json 48 50 49 51 This command is **extremely slow**, because Twitter impose a rate limit of no more than one request per minute to this endpoint! If you are running it against an account with thousands of followers you should expect this to take several hours. 50 52
+5 -4
twitter_to_sqlite/cli.py
··· 48 48 type=click.Path(file_okay=True, dir_okay=False, allow_dash=False), 49 49 required=True, 50 50 ) 51 - @click.argument( 52 - "auth_path", 51 + @click.option( 52 + "-a", 53 + "--auth", 53 54 type=click.Path(file_okay=True, dir_okay=False, allow_dash=True, exists=True), 54 55 default="auth.json", 55 56 ) 56 57 @click.option("--user_id", help="Numeric user ID") 57 58 @click.option("--screen_name", help="Screen name") 58 59 @click.option("--silent", is_flag=True, help="Disable progress bar") 59 - def followers(db_path, auth_path, user_id, screen_name, silent): 60 + def followers(db_path, auth, user_id, screen_name, silent): 60 61 "Save followers for specified user (defaults to authenticated user)" 61 - auth = json.load(open(auth_path)) 62 + auth = json.load(open(auth)) 62 63 session = utils.session_for_auth(auth) 63 64 db = sqlite_utils.Database(db_path) 64 65 fetched = []