Skip to content
BenDaBomb.com
BenDaBomb.com

Design, imagine, create.Fun Science and Awesome Content!

  • Cut the crap
  • Home
  • science
  • Videos
0
0

Videos

// generateTrendingPageBruteForce.js const axios = require(‘axios’); const fs = require(‘fs’); async function generateTrendingPage() { try { const url = ‘https://www.youtube.com/feed/trending’; const { data } = await axios.get(url, { headers: { ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64)’ } }); // Use regex or cheerio-like parsing to get all hrefs with /watch?v=… const videoSet = new Set(); const regex = /href=”(\/watch\?v=[^”&]+)”/g; let match; while ((match = regex.exec(data)) !== null) { videoSet.add(match[1]); } const videos = Array.from(videoSet).slice(0, 15); // Generate HTML with embedded videos const html = ` YouTube Trending Videos Embed

YouTube Trending Videos Embed

${videos .map( path => { const id = path.split(‘v=’)[1]; return `
`; } ) .join(‘\n’)} `; fs.writeFileSync(‘youtubeTrendingEmbed.html’, html, ‘utf-8’); console.log(‘Generated youtubeTrendingEmbed.html with’, videos.length, ‘videos.’); } catch (e) { console.error(‘Error:’, e.message); } } generateTrendingPage();
BenDaBomb.com

Design, imagine, create.Fun Science and Awesome Content!

COPYRIGHT © 2025 - BenDaBomb.com // Designed By - ZeeTheme