Skip to main content

Download images and videos from Instagram

Project description

BasketCase

Download images and videos from Instagram.

Installation and usage

  1. Install it from PyPI.
pip install basketcase

This will put the executable basketcase on your PATH.

  1. Create a text file (e.g. basketcase.txt) and populate it with resource URLs.
https://instagram.com/p/<post_id>
https://instagram.com/reel/<reel_id>
https://instagram.com/<username>
Supported URL Description
https://instagram.com/<username> User profile. Downloads stories from the past 24 hours.
https://instagram.com/p/<post_id> Standard publication.
https://instagram.com/reel/<reel_id> Reels movie
  1. Pass the file as a positional argument. An interactive authentication procedure will follow.
basketcase ./basketcase.txt

Downloaded resources will be stored in the current working directory (i.e. $PWD/basketcase_{timestamp}/).

Known limitations:

  • Highlights are not supported yet.
  • Although two-factor authentication is supported, only the totp method has been tested.

User data

Cookies and other application data are kept in ~/.basketcase.

Development setup

  1. cd to the project root and create a virtual environment in a directory named venv, which is conveniently ignored in version control.
  2. Install the dependencies.
pip install -r requirements.txt
  1. Install this package in editable mode.
pip install -e .

Package build and upload

  1. Update the requirements list.
pip freeze --exclude-editable > requirements.txt
  1. Increment the version on pyproject.toml.
  2. Build and publish the package
hatch build
hatch publish
  1. Commit and push the changes (and the new version tag) to the git repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

basketcase-3.1.1.tar.gz (86.6 kB view details)

Uploaded Source

Built Distribution

basketcase-3.1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file basketcase-3.1.1.tar.gz.

File metadata

  • Download URL: basketcase-3.1.1.tar.gz
  • Upload date:
  • Size: 86.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for basketcase-3.1.1.tar.gz
Algorithm Hash digest
SHA256 4fe44d4c7821f227e3fbd80206d55237a2e0dab7ce9a082ffa1b091ef19e4278
MD5 3527e935d921bb714926cb8cdf72d244
BLAKE2b-256 64f1a72e9fb4cdae2b311dafc3448c6b024a192cdddf8d5635d65355f9996d97

See more details on using hashes here.

File details

Details for the file basketcase-3.1.1-py3-none-any.whl.

File metadata

  • Download URL: basketcase-3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for basketcase-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e5062ea78258ddb351e57c714a25dd1f614e40aa9c6774b01d4883df00eb7826
MD5 c98faf6a7141bee77fb9be0c94c7fee7
BLAKE2b-256 2cf07713679fdaba68b2f5b3781d241df7c3534e17d2f98384bc684d74201ece

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page