1
0
mirror of https://github.com/balkian/bitter.git synced 2024-12-22 00:18:12 +00:00
not really known
Go to file
J. Fernando Sánchez 17f589c710 Added webserver
2016-09-14 19:53:56 +02:00
bitter Added webserver 2016-09-14 19:53:56 +02:00
tests Added webserver 2016-09-14 19:53:56 +02:00
.gitignore First commit 2016-01-14 21:42:51 +01:00
Dockerfile First commit 2016-01-14 21:42:51 +01:00
MANIFEST.in First commit 2016-01-14 21:42:51 +01:00
README.md Added webserver 2016-09-14 19:53:56 +02:00
requirements.txt Added webserver 2016-09-14 19:53:56 +02:00
setup.py Added webserver 2016-09-14 19:53:56 +02:00
test-requirements.txt First commit 2016-01-14 21:42:51 +01:00

#Description There are two parts to bitter. First of all, it is a wrapper over Python twitter that adds support for several Twitter API credentials (e.g. authorizing the same app with different user accounts). Secondly, it is a command line tool to automate several actions (e.g. downloading user networks) using the wrapper.

Instructions

In the command line:

python -m bitter --help

or

bitter --help

Programmatically:

from bitter.crawlers import TwitterQueue
wq = TwitterQueue.from_credentials()
print(wq.users.show(user_name='balkian'))

Credentials format

{"user": "balkian", "consumer_secret": "xxx", "consumer_key": "xxx", "token_key": "xxx", "token_secret": "xxx"}

By default, bitter uses '~/.bitter-credentials.json', but you may choose a different file:

python -m bitter -c <credentials_file> ...

Server

To add more users to the credentials file, you may run the builtin server, with the consumer key and secret of your app:

python -m bitter server <consumer_key> <consumer_secret>

Notice

Please, use according to Twitter's Terms of Service

TODO

  • Tests
  • Docs