Quelques scripts pour faire un bot Twitter en Python/Bash, sur un Raspberry Pi.
Voici comment installer les outils nécessaires :
sudo apt-get install python-setuptools python-dev libffi-dev libssl-dev python-pip
sudo pip install twython
sudo pip install requests[security]
Vous devez vous connecter sur l'Application Management de Twitter, avec le compte bot. Créez une application.
Ensuite, allez dans "Permissions" et mettez "Read and Write".
Dans "Keys and Access Tokens", générez un token.
Dans les différents scripts python, rempacez les différents tokens et et clés par les votres (4 en tout).
C'est bon, vous pouvez tweeter !
Pour faire un bot avec ces scripts, utilisez cron.
Par exemple : https://github.com/Angristan/twython-scripts/blob/master/cron.
J'ai mis tout ceci en application sur un Raspberry Pi. Vous pouvez le suivre : @AngristanRPiBot.
Enjoy !
The unlicense : do whatever you want with the code.