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
- 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.
- 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>/
- 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/
).
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-1.0.1.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file basketcase-1.0.1.tar.gz
.
File metadata
- Download URL: basketcase-1.0.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58fb3ba8ec9195b80b897ca238fe67831717ba11848e0edd1c3e02bb00e9f8e6 |
|
MD5 | 98b872fcf7b8fa5bd87de3ad4ba96f04 |
|
BLAKE2b-256 | 11cdb97d546ba51bd7e0de5e0494a2aa0ec80b11b292271f30e9741a3eb24f30 |
File details
Details for the file basketcase-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: basketcase-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c78a55b3c6aab97e4e95a5f4adc23083aef7cb58998a7e34c74783d725730d84 |
|
MD5 | 3814cc697def64007c9ced28985b2661 |
|
BLAKE2b-256 | f08358e4c357978c7772f94ee39395a434a43b6bd69279d33cc22e23d852fa2e |