Fetch resources from Instagram
Project description
BasketCase
Fetch resources from Instagram.
Downloads images and videos in their highest quality. You will need to authenticate in order to avoid rate limits and access controls.
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
- Install it from PyPI.
pip install basketcase
This will put the executable
basketcase
on your PATH.
- 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>/
- Pass the file as a positional argument. The
-l
flag means it will attempt to login first.
basketcase -l ./basketcase.txt
Downloaded resources will be stored in the current working directory (i.e.
$PWD/basketcase_{timestamp}/
).
Development setup
cd
to the project root and create a virtual environment in a directory namedvenv
, which is conveniently ignored in version control.- Install the dependencies.
pip install -r requirements.txt
- Install this package in editable mode.
pip install -e .
Package build and upload
- Update the requirements list.
pip freeze --exclude-editable > requirements.txt
- Increment the version on
setup.cfg
. - Build and upload to PyPI.
python -m build
python -m twine upload dist/*
- Commit and push the changes (and the new version tag) to the git repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
basketcase-2.0.0.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file basketcase-2.0.0.tar.gz
.
File metadata
- Download URL: basketcase-2.0.0.tar.gz
- Upload date:
- Size: 5.3 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.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 698652f3bb4c37a2bec58a745368c8d2a36f1585af60965aeb3935c2af92be06 |
|
MD5 | fe3258472d0760e07330f11194c0f4d6 |
|
BLAKE2b-256 | 895d22893cda847c72b6f1f44f4bda3216fc441c7a2b1b00e0a57429a2db021b |
File details
Details for the file basketcase-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: basketcase-2.0.0-py3-none-any.whl
- Upload date:
- Size: 6.0 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.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98e2774f6805bee96529b4ef30cab81a303cc796cfe18474bd5ad69a1e6a7cf8 |
|
MD5 | 32ba63d31321a89310b2c4cfde925c0e |
|
BLAKE2b-256 | 893f6a24eca8f44cc8df382a37ab9e6c4aa2c1d755a59a55193a2ccf8f94a4a4 |