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 will 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, optionally passing the session cookie.
cat basketcase.txt | basketcase -c session_cookie_id

Downloaded resources will be stored in the current working directory (i.e. $PWD/basketcase_{timestamp}/).

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

Uploaded Source

Built Distribution

basketcase-1.0.4-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: basketcase-1.0.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for basketcase-1.0.4.tar.gz
Algorithm Hash digest
SHA256 2886e354abf89c10d4fd3b468503088a8174a4f3366c77cb109709e7937505f1
MD5 b30e6f918a81019039f97f00b1b336f1
BLAKE2b-256 5d252676516b1b81316305e368a02d2a40c1c906b5871957cfcc764acee24e4b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: basketcase-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for basketcase-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0cd78c95d5a311d12a4e47cd57a287a4541fb6b7485d278a8cb7e3abf4925f2c
MD5 1a46343b605e90a071c43d4d4779bae5
BLAKE2b-256 7b0876b297728dbb282f073f6a871491919614ccda6ed602c4e0a0ff8f9163ed

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