Skip to main content

CircleCI

What it does

Download all images uploaded by a specified Twitter user.

What you need

  • Python 3 (>= 3.7)

Setup

First, you need to install twitter-image-dl:

$ pip install twitter-image-dl

Next, you need to generate your api key and api secret key. If you don't have them, go to Twitter Developers and create your application. After you get your api key and api secret key, create a json file like this:

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

Usage

To download the images the user of id "foo" has uploaded, enter the command like the following on the command line:

$ twt_img foo -c confidentials.json

where confidentials.json is the json file containing your api keys. This command creates a directory called foo and save images to that directory.

If you want to save images to a directory other than foo, use -d or --dest argument to specify the destination.

You can specify which size of images to download using the optional argument -s (or --size). There are five values you can specify:

  • large
  • medium
  • small
  • orig
  • thumb

If you don't specify this value, images of large size will be downloaded by default.

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

Provide a number to the -l or --limit argument (e.g. -l 25) to limit how many tweets are inspected for images (starting with the most recent). Note that if you're using --limit without --rts, the number of tweets inspected can be smaller than the specified limit.

Testing

Install dependencies for testing and run tests like this:

$ git clone git@github.com:morinokami/twitter-image-downloader.git
$ cd twitter-image-downloader
$ pipenv install --dev
$ pipenv run test

Metadata

Release files for twitter-image-dl 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for twitter-image-dl 0.2.2
File Size Uploaded Provenance
twitter-image-dl-0.2.2.tar.gz 4.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for twitter-image-dl 0.2.2
File Interpreter ABI Platform
twitter_image_dl-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / twitter-image-dl-0.2.2.tar.gz

Download URL twitter-image-dl-0.2.2.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0dc6ac4ede5ea373db04900d2d4c6a8017dd361a55cebf328b2a13e456eb39c8
BLAKE2b-256 checksum
How to use checksums
f811abdf7ae661431238400dd32d9f65d32b3216e37408adf50f7065004c93c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4

Release files / twitter_image_dl-0.2.2-py3-none-any.whl

Download URL twitter_image_dl-0.2.2-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e6df062318f6f58918660ab4ad795db9c2db3020bfd3bcb3623baacfe7b8dad
BLAKE2b-256 checksum
How to use checksums
3ac941e51af4c374e52bebbfbb31683f2e11f689ceabf468076d68a146922ed3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4

Security for twitter-image-dl 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page