https://github.com/jorbush/jorbites_instagram_giveaway_scripts
simple CLI spripts for an Instagram giveaway post
https://github.com/jorbush/jorbites_instagram_giveaway_scripts
Last synced: 10 months ago
JSON representation
simple CLI spripts for an Instagram giveaway post
- Host: GitHub
- URL: https://github.com/jorbush/jorbites_instagram_giveaway_scripts
- Owner: jorbush
- Created: 2025-08-08T19:08:00.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-08-26T16:00:00.000Z (11 months ago)
- Last Synced: 2025-08-26T22:17:57.899Z (11 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jorbites Instagram Giveaway Scripts
Fetch comments from an Instagram giveaway post, extract `jorbites.com/recipes/{id}` links, tally valid entries per user (one entry per valid comment), and compute each participant's probability of winning.
## Setup
```bash
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
```
Provide credentials via `.env` (auto-loaded):
```
IG_USERNAME=your_username
IG_PASSWORD=your_password
```
## Usage
### Compute participants and show table
```bash
python giveaway.py \
--post-url "https://www.instagram.com/p/DNDunraMPPb/"
```
- The script logs in with `IG_USERNAME`/`IG_PASSWORD` and fetches the post’s comments.
- A comment is counted only if it contains a `https://jorbites.com/recipes/{id}` link.
- Each valid comment = 1 entry for that user.
- The terminal prints a compact, nicely formatted table with rank, username, entries and probability.
### Pick winners
- Pick winner(s) (weighted by number of valid comments):
```bash
python pick_winner.py \
--post-url "https://www.instagram.com/p/DNDunraMPPb/"
```
- The terminal prints compact and nicely formatted boxes/tables.