Giter Club home page Giter Club logo

py-twitter-spider's Introduction

Python Twitter Spider

A python script to that retrieves screen names upon input of an initial screen name. Upon getting an initial screen name, the program connects with twitter api and retrieves account information. If it is successful, the program then proceeds to retrieve at most 100 friend's screen name and enters them in the database. A unique ID is assignned to each entered and retrieved account and accounts followed by the current accounts are mapped in another table using from_id and to_id, where from_id is the current account and to_id is the retrieved account. Finally, the program marks the entered screen name as retrieved.

Once the data has been stored (after the very first program execution) in database, the program prompts the user to enter another twitter screen name. Now, the user has the option to either enter a screen name again or just press enter. If a screen name is entered, the program checks the database if the name already exists or not. If the name does not exist, then the program creates a new entry in the database with the name. The program then retrieves at most 100 friends of the current account and creates a new entry for these screen names if they do not previously exist. It also performs the mapping of from_id to to_id to keep track of who follows who.

Usage

For this program to run successfully, Following things must ensured:

  • sqlite browser should be installed for viewing the stored data

  • sqlite library should be installed for python

  • tweepy library should be installed for python

  • the user needs have a Twitter Developer account.

From the developer account, the user must retrieve following keys:
API key

API key secret

Bearer token

Access token

Access token secret
The above codes/keys are required to be entered in the text file ./Keys/keys.txt

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.