Code Monkey home page Code Monkey logo

sarb's Introduction

SARB

A Twitter Search And Retweet Bot.

Becarefull before use: you must "nettoyer tes tuyaux" with this : http://www.youtube.com/watch?v=wdpXyI3_Qpk

Description

Le "bot" utilise un compte tweeter pour retweeter les tweets trouvés à partir d'une requête de recherche. Il lui faut donc:

  • un compte tweeter pour retweeter
  • ce compte doit autauriser l'application SARB
  • et aussi, de préférence, un ordinateur allumé en permanence et connecté à Internet ;-)

Mode d'emploi

Pour comprendre le mode d'emploi il est préférable de connaitre le protocole oauth2 utilisé par Tweeter.

Par exemple à mettre en "cron" une ligne du genre:

*/15 * * * * /path/SARB.php -c /path/secrets.txt -s '#truc OR #bidule' -l fr

On peut simuler le fonctionnement, pour voir si des tweets sont trouvés ou bien simplement que ça fonctionne, avec l'option "-z", c'est à dire que les tweets ne seront pas retweetés.

./SARB.php -z -c secrets.txt -s '#truc OR #bidule' -l fr

Il y a le TwitterTools.php qui permet d'obtenir le token d'autorisation du compte:

./TwitterTools.php -c secrets.txt -a authApp

Le fichier de configuration (option -c) doit au minimum contenir les 2 valeurs suivantes pour identifier l'application:

  • OAUTH_CONSUMER_KEY
  • OAUTH_CONSUMER_SECRET

Après l'obtention du token d'autorisation on ajoutera les 3 valeurs:

  • USERID
  • OAUTH_ACCESS_TOKEN
  • OAUTH_ACCESS_SECRET

Pour tester le fichier de configuration lancer une recherche avec TwitterTools.php :

./TwitterTools.php -c secrets.txt -a search -q '#enjoy'

il est possible de limiter la recherche à une langue (option -l)

./TwitterTools.php -c secrets.txt -a search -q '#enjoy' -l fr

sarb's People

Contributors

cyrille37 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.