• Home
  • Academic
  • Publications
  • Resources
  • Contact
  • Home
  • Academic
  • Publications
  • Resources
  • Contact

Code Notebooks

Writing a Twitter Bot

3/22/2015

 
​The following code illustrates how to write a Twitter bot that automatically finds relevant users to follow, and unfollows users that haven't followed back. In the example usage, the bot intakes a seed list of influencers and harvests information about their followers. It then selectively follows a subset of the most relevant users, given a set of customizable conditions (e.g., language, keywords, Tweet frequency). In keeping with API limits, the bot auto-follows 250 new users at a time, caching a "blacklist" of users that have already been added.

    Code Snippets

    Introductory coding demos in Python. Click the file name in the lower left-hand corner to view full screen at Github.

    Archives

    February 2018
    January 2017
    December 2015
    March 2015
    June 2014
    April 2013
    December 2012

    Categories

    All
    Data Analysis
    Episodic Memory
    Language Processing
    N-gram
    NLP
    NLTK
    Social Media
    Stylometrics
    Web Scraping

Powered by Create your own unique website with customizable templates.