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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: basketcase-3.0.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.2

File hashes

Hashes for basketcase-3.0.1.tar.gz
Algorithm Hash digest
SHA256 d88e5e64bf42cc58333667386a50c50b2e0d6cb33ab1ba9faa7616cc9a469d31
MD5 b12d872f7fdacadaf6792253cea8cee9
BLAKE2b-256 179f144a2eb704d4171b066df9f1e2d1fa14d81bec1400b364e072bc5a34c85f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: basketcase-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.2

File hashes

Hashes for basketcase-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bae04822a04fd84cd8e6aeb7cf3ab780ff962aaf88a06e5b0c0e0703d7c8f01a
MD5 5e0acb456a049392f802a33ac57369e2
BLAKE2b-256 27b3059146a4db39a153577997a7b63d6b7683b35a64aa2959336ad438461afa

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