Files
indee-demo/download_indeedhub_content.py
Dorian f8abd42329 feat: transparent header and image download scripts
- Made header transparent on scroll for premium Netflix-style look
- Added browser console script to download all IndeeHub images
- Created Python script for batch image downloading
- Added shell script for curl-based downloads

The header now starts fully transparent and transitions to semi-transparent
black with blur when scrolling, creating a floating navigation effect.

Download scripts will extract all film posters, backdrops, and metadata
from IndeeHub.studio screening room.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-02 22:23:17 +00:00

95 lines
3.1 KiB
Python

"""
Script to download all IndeeHub film images and metadata
Run this in the browser console on https://indeehub.studio/screening-room?type=film
Then copy the output and save it to a file
"""
# Paste this in browser console:
console_script = """
// Extract all film data from screening room
const films = Array.from(document.querySelectorAll('a[href^="/film/"]')).map(card => {
const img = card.querySelector('img');
const title = card.querySelector('h3, [class*="title"]')?.textContent?.trim();
const href = card.getAttribute('href');
return {
id: href.replace('/film/', ''),
title: title,
link: 'https://indeehub.studio' + href,
posterSrc: img?.src,
posterDataSrc: img?.getAttribute('data-src'),
alt: img?.alt
};
});
console.log('Found ' + films.length + ' films');
console.log(JSON.stringify(films, null, 2));
// Download this data
const dataStr = JSON.stringify(films, null, 2);
const dataBlob = new Blob([dataStr], {type: 'application/json'});
const url = URL.createObjectURL(dataBlob);
const link = document.createElement('a');
link.href = url;
link.download = 'indeedhub-films.json';
link.click();
"""
print("STEP 1: Copy and paste this into browser console:")
print("="*60)
print(console_script)
print("="*60)
print("\nSTEP 2: The script will download 'indeedhub-films.json'")
print("\nSTEP 3: Then run the image download script below")
# Python script to download images
import json
import os
import requests
from pathlib import Path
def download_images():
"""Download all film images from IndeeHub"""
# Load the JSON file
with open('indeedhub-films.json', 'r') as f:
films = json.load(f)
# Create directories
Path('public/images/films/posters').mkdir(parents=True, exist_ok=True)
Path('public/images/films/backdrops').mkdir(parents=True, exist_ok=True)
print(f"Downloading images for {len(films)} films...")
for film in films:
film_id = film['id']
print(f"Downloading: {film['title']}...")
# Download poster (640px)
poster_url = f"https://indeehub.studio/_next/image?url=%2Fapi%2Fposters%2F{film_id}&w=640&q=75"
try:
response = requests.get(poster_url)
if response.status_code == 200:
with open(f'public/images/films/posters/{film_id}.jpg', 'wb') as f:
f.write(response.content)
print(f" ✓ Poster downloaded")
except Exception as e:
print(f" ✗ Poster failed: {e}")
# Download backdrop (1920px)
backdrop_url = f"https://indeehub.studio/_next/image?url=%2Fapi%2Fbackdrops%2F{film_id}&w=1920&q=75"
try:
response = requests.get(backdrop_url)
if response.status_code == 200:
with open(f'public/images/films/backdrops/{film_id}.jpg', 'wb') as f:
f.write(response.content)
print(f" ✓ Backdrop downloaded")
except Exception as e:
print(f" ✗ Backdrop failed: {e}")
print("\n✅ Download complete!")
if __name__ == '__main__':
download_images()