- 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>
72 lines
2.4 KiB
JavaScript
72 lines
2.4 KiB
JavaScript
// INSTRUCTIONS: Run this in browser console on https://indeehub.studio/screening-room?type=film
|
|
|
|
// Step 1: Extract all film card data
|
|
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));
|
|
|
|
// Step 2: Download the JSON 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';
|
|
document.body.appendChild(link);
|
|
link.click();
|
|
document.body.removeChild(link);
|
|
|
|
console.log('✅ Downloaded: indeedhub-films.json');
|
|
|
|
// Step 3: Now download all images one by one
|
|
async function downloadImage(url, filename) {
|
|
try {
|
|
const response = await fetch(url);
|
|
const blob = await response.blob();
|
|
const blobUrl = URL.createObjectURL(blob);
|
|
const a = document.createElement('a');
|
|
a.href = blobUrl;
|
|
a.download = filename;
|
|
document.body.appendChild(a);
|
|
a.click();
|
|
document.body.removeChild(a);
|
|
URL.revokeObjectURL(blobUrl);
|
|
console.log(`✓ Downloaded: ${filename}`);
|
|
} catch (e) {
|
|
console.error(`✗ Failed: ${filename}`, e);
|
|
}
|
|
}
|
|
|
|
// Step 4: Download all posters
|
|
console.log('\nDownloading posters...');
|
|
for (const film of films) {
|
|
const posterUrl = `https://indeehub.studio/_next/image?url=%2Fapi%2Fposters%2F${film.id}&w=640&q=75`;
|
|
await downloadImage(posterUrl, `poster-${film.id}.jpg`);
|
|
await new Promise(r => setTimeout(r, 500)); // Wait 500ms between downloads
|
|
}
|
|
|
|
// Step 5: Download all backdrops
|
|
console.log('\nDownloading backdrops...');
|
|
for (const film of films) {
|
|
const backdropUrl = `https://indeehub.studio/_next/image?url=%2Fapi%2Fbackdrops%2F${film.id}&w=1920&q=75`;
|
|
await downloadImage(backdropUrl, `backdrop-${film.id}.jpg`);
|
|
await new Promise(r => setTimeout(r, 500)); // Wait 500ms between downloads
|
|
}
|
|
|
|
console.log('\n✅ ALL DOWNLOADS COMPLETE!');
|
|
console.log('Check your Downloads folder for all images');
|