Git Product home page Git Product logo

twitter-dump's Introduction

About

Extract all tweets for a given query. This uses Twitters private API (via twitter.com) to bypass quotas/limits.

Installation

dotnet tool install --global TwitterDump

General

First, you must setup the authentication.

twitter-dump auth

After you have followed the instructions and succesfully authenticated, you can now dump a search to a JSON file.

twitter-dump search -q "(from:realDonaldTrump)" -o trump.json

Installation in Ubuntu 20.04

To install on Unbuntu 20.04 do:

$ wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$ sudo dpkg -i packages-microsoft-prod.deb
$ sudo apt-get update
$ sudo apt-get install -y apt-transport-https && sudo apt-get update
$ sudo apt-get install dotnet-sdk-3.1

$ export PATH="$PATH:$HOME/.dotnet/tools"

$ dotnet tool install --global TwitterDump

The software is now installed. You now need to get a token from a logged in session:

  • Using the Chromium browser log in to Twitter and then navigate to: https://twitter.com/search
  • Open Chromium developer tools (Ctrl-Shift I)
  • Open the Network tab on the developer tools
  • Filter requests for "adaptive.json"
  • Search for anything in the web page (doesn't matter what)
  • Scroll down until a network request for "adapative.json" is made
  • Right click the request and click "Copy -> Copy as cURL"
  • In a terminal run: perl -pe 's/\\n//g' | twitter-dump auth
  • Paste the contents of your clipboard
  • Press Ctrl-D to close the input to 'perl'

Now you can run:

$ twitter-dump search -q "(from:GnuParallel)" -o gnuparallel.json

License

MIT

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.