GithubHelp home page GithubHelp logo

gonzaloulla / twitter-scrape Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dataquestio/twitter-scrape

0.0 1.0 1.0 643 KB

Download streaming tweets that match specific keywords, and dump the results to a file.

Python 96.15% Shell 3.85%

twitter-scrape's Introduction

Twitter Scrape

Scrapes Tweets from Twitter into a DB. Dumps Tweets to a different JSON file each minute.

Calculates the number of tweets per minute that contain a particular term in their message.

Installation

  • pip install -r requirements.txt

Usage

  • python scraper.py -h
  • python count_tweets_per_minute.py -h or ./count_tweets_per_minute.sh [TERM] (Docker)

Setup

  • Create a file called private.py.
  • Sign up for a Twitter developer account.
  • Create an application here.
  • Set the following keys in private.py. You can get these values from the app you created:
    • TWITTER_KEY
    • TWITTER_SECRET
    • TWITTER_APP_KEY
    • TWITTER_APP_SECRET
  • Set the following key in private.py.
    • CONNECTION_STRING -- use sqlite:///tweets.db as a default if you need to. It's recommended to use postgresql, but not necessary.

Usage

  • python scraper.py [ARGS] to scrape. Use Ctrl + C to stop.
  • python scraper.py --help to get help.

twitter-scrape's People

Contributors

gonzaloulla avatar vikparuchuri avatar

Watchers

 avatar

Forkers

julirios

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.