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_{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-1.0.5.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file basketcase-1.0.5.tar.gz
.
File metadata
- Download URL: basketcase-1.0.5.tar.gz
- Upload date:
- Size: 4.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32a40e4aa6892e15918bc60294e65f6d0d8d5db76e47e75d2ca38d3113b48e3b |
|
MD5 | fdbac6a5a0032299cca2182dd767c8fc |
|
BLAKE2b-256 | adfc66c3cad2177ff6e31571469fe4fe175ec1557dfba2fb76d47f23be29ca75 |
File details
Details for the file basketcase-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: basketcase-1.0.5-py3-none-any.whl
- Upload date:
- Size: 5.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b269fa7530f561bb95855f5166a1bb92d9633a8548964455d0fcb51a734f114 |
|
MD5 | ccb5cbcf89fc43667c570dd70ac8bc93 |
|
BLAKE2b-256 | 248e5f459e34e67a2607b25bf1daf269093f7ae12a34497f2af04263977d8567 |