Skip to main content

Fetch resources from Instagram

Project description

BasketCase

Fetch resources from Instagram.

It can download images and videos in their highest quality from any type of publication. You need a session cookie to avoid rate limits and access controls.

Installation and usage

  1. Install it from PyPI. The --user flag means it will be installed in your home directory.
pip install --user 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. Pipe the contents of the file to the script, passing the session cookie as its first argument.
cat urls.txt | basketcase <session_cookie_id>

Downloaded resources will be stored in the current working directory (i.e. $PWD/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-0.0.6.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

basketcase-0.0.6-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: basketcase-0.0.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5

File hashes

Hashes for basketcase-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8cf494392d00d7a678885af0c05291e8aa3f5ef874e84b1b4ab185ba1c1aaf5e
MD5 8b342207ec19569221bbf00044f79a55
BLAKE2b-256 a56b9fae47c21ae6e3e8863dc403acd6eed922703cbe9cdd76328eed4f1dba0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: basketcase-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5

File hashes

Hashes for basketcase-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2cc711e18441d0407330e960b9eec869762a81ab984213b1f7bbf9022085bb3a
MD5 c1e14df772cb937689a16343bf7367e5
BLAKE2b-256 8e97fc7e88f15988b5a26bd8d13ac696d85258b27c3b199f946be70340e3b6cf

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