Git Product home page Git Product logo

twitter-get-old-tweets-scraper's Introduction

Old Tweets Scraper Using Python


Twitter's API no longer allows the retrieval of tweets past 7 days old using apps. Some third party apps are available to allow retrieval of tweets past 7 days old but you need to spend money in most cases. This script was written to enable the retrieval of tweets past the limitation of the API. Most of the code were written and modified based on @Jefferson-Henrique's scraper. The code was modified to support Python 3 and to comply to pep coding standards.


Installation

Download the source code using git. Install python dependencies by typing make install in the terminal.


Command Line Usage

The script can be used by typing python main.py and requires an argument passed with it. For more information you may type python main.py -help in the command line.


Parameters

The script can be run with 5 arguments. The query and/or username argument must be used. The other arguments are optional.

Argument Format Usage Example
query python main.py --query "#MarcosNotAHero" --max-tweets 1
username python main.py --username "barackobama" --max-tweets 1
since YYYY-MM-DD python main.py --query "Benham Rise" --since 2016-01-01 --max-tweets 1
since YYYY-MM-DD python main.py --query "Benham Rise" --until 2017-04-01 --max-tweets 1
max-tweets (default: 100) python main.py --query "#MarcosNotAHero" --max-tweets 1

Code Usage

You may also write your own code based on the controllers and models inside the scraper folder.

twitter-get-old-tweets-scraper's People

Contributors

pjhrobles 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.