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 24h.
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.0.tar.gz (86.5 kB view details)

Uploaded Source

Built Distribution

basketcase-3.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: basketcase-3.1.0.tar.gz
  • Upload date:
  • Size: 86.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for basketcase-3.1.0.tar.gz
Algorithm Hash digest
SHA256 496102b0275278c0a6708124aa131d8d9a69be071c742396dd175972f83b0a2a
MD5 ce954cf28e73e56cc5e72256a9431fbf
BLAKE2b-256 aff545fad9512a55d98bbc4a305bca26ea548008ce3a870832f4f616a356f360

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for basketcase-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf39fb5fb5d35bec316eb5e8bf25a6b6b348a786af44ab1c9a2e5949a1b88373
MD5 47ffcd2ec6f97a737357dd48480ffb8b
BLAKE2b-256 6b5a23c942c5d1d5a019831c4324d38cf0c3de5e671014f1329288fd3cd03e1e

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