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 setup.cfg.
  2. Build and upload to PyPI.
python -m build
python -m twine upload dist/*
  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.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

basketcase-3.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: basketcase-3.0.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/30.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.2.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.3

File hashes

Hashes for basketcase-3.0.0.tar.gz
Algorithm Hash digest
SHA256 33b71d7722eae689ff64e41e95b8068fd919744e2c6c7385935aff1fef5803a9
MD5 f22018ffbf6a3d28cd35d9ecce789b41
BLAKE2b-256 a045f2bee17e619940f46da641cb7e26390e0d7145b9caeaebfe859fa47a082d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: basketcase-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/30.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.2.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.3

File hashes

Hashes for basketcase-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bc906a7717f7878f2a39932e7ca608f6a4f0ec6e4909e323f4030be9d07cddd
MD5 2ee76cdea172ab09105c8cdd62e793b9
BLAKE2b-256 30ec7ab01a4794c6dd3dfefaffff700097ac290b6d240e075f0d28d5e121790a

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