Skip to main content

Fetch resources from Instagram

Project description

BasketCase

Automates downloading images and videos from Instagram posts.

Known limitations:

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

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://www.instagram.com/p/<post_id>/
https://www.instagram.com/p/<post_id>/
https://www.instagram.com/p/<post_id>/
https://www.instagram.com/p/<post_id>/
  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}/).

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.0.2.tar.gz (87.7 kB view details)

Uploaded Source

Built Distribution

basketcase-3.0.2-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for basketcase-3.0.2.tar.gz
Algorithm Hash digest
SHA256 fb39bdefc158a47a7760b249a20614fee0fd3157d61618e59f9321a3e5e65319
MD5 a28567aca651502dd6a6c42c65631d9e
BLAKE2b-256 1b0336300659eb93b54699d43c3cd625fe22b9d620d3aca581b81112446364ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: basketcase-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for basketcase-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 514c03f7ab7fd40657a69671bec9c036b797a8cd2f4876660e9c2da919b822cb
MD5 7b24cec1b19957755cf540e5237c177f
BLAKE2b-256 a4f583923065d4a6b9ba7fe58b4a8bb85d7b57be474bd59397294c9d48e841b2

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