Giter VIP home page Giter VIP logo

twitter-image-downloader's Introduction

Build Status

About

With this program, you can download all images uploaded by a specific twitter user.

Setup

First, before downloading images, you have to install dependencies using pip:

$ pip install -r requirements.txt

Of course, you need your api key and api secret as well. if you don't have them, consult Twitter Developers and create your application. After you get your api key and api secret, create a json file which should look like:

{
  "api_key": "your api key",
  "api_secret": "your api secret"
}

Usage

To download the images the user of id "foo" has uploaded, enter the command below in the command line:

$ python3 twt_img.py foo dest_path -c confidentials.json

where dest_path is the directory where images will be downloaded, and confidentials.json is a json file containing your api key and api secret.

You can specify which size of images to download using the optional argument -s (or --size). There are five values you can use for it: large, medium, small, orig, or thumb. If you don't specify this value, images of large size will be downloaded by default.

Provide a number to the -l or --limit argument (e.g. -l 25) to limit how many tweets are checked for images (starting with the most recent). Note that if you're using --limit but not --rts, tweets may be checked in batches smaller than this limit.

Using the --rts flag, you can also download images contained in retweets.

twitter-image-downloader's People

Contributors

morinokami avatar triskaideka avatar

Watchers

James Cloos 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.