Skip to content

Instantly share code, notes, and snippets.

@virgiliu
Created November 1, 2020 14:13
Show Gist options
  • Select an option

  • Save virgiliu/eefbadef4de9d2ecb2e01020ae471892 to your computer and use it in GitHub Desktop.

Select an option

Save virgiliu/eefbadef4de9d2ecb2e01020ae471892 to your computer and use it in GitHub Desktop.
Gumroad bulk download
// Run this in the content download page and it will trigger download for everything
var sleep = (milliseconds) => {
return new Promise(resolve => setTimeout(resolve, milliseconds))
}
var waitTime = 1500; //ms
var x = $( "button:contains('Download')" );
for(var i = 0; i < x.length ; i++)
{
(function(idx) {
// Wait needed because browser blocks network calls if you make too many too fast
sleep(i * waitTime).then(() => {
x[idx].click();
});
})(i)
}
@christophhdesign
Copy link

Something updated that worked for me in 02.2026.

Just copy & paste into your browser console while being on the Gurmoad downloads page


/**
 * Gumroad Bulk Downloader
 * 
 * A simple script to download all files from a Gumroad purchase page at once.
 * Useful when you've purchased a bundle with many files and don't want to
 * click each download link individually.
 * 
 * Usage:
 * 1. Open the Gumroad page with your purchased content
 * 2. Open Developer Tools (F12 or right-click > Inspect)
 * 3. Go to the "Console" tab
 * 4. Paste this entire script and press Enter
 * 5. Files will download with a delay between each to avoid rate limiting
 * 
 * License: MIT
 */

(async function() {
    'use strict';

    // --- Configuration ---
    const BASE_URL = 'https://app.gumroad.com';
    const DELAY_SECONDS = 5; // Delay between downloads to avoid rate limiting

    // --- Helper Functions ---
    const sleep = (seconds) => new Promise(resolve => setTimeout(resolve, seconds * 1000));

    const downloadFile = (url) => {
        const link = document.createElement('a');
        link.href = url;
        link.style.display = 'none';
        document.body.appendChild(link);
        link.click();
        document.body.removeChild(link);
    };

    // --- Main Logic ---
    console.log('%c๐Ÿš€ Gumroad Bulk Downloader', 'color: #4CAF50; font-size: 18px; font-weight: bold;');
    console.log('โ”'.repeat(50));

    // Find all download links
    const links = document.querySelectorAll('a[href*="/r/"][href*="product_files"]');
    const seen = new Set();
    const downloads = [];

    links.forEach(link => {
        const href = link.getAttribute('href');
        if (href && href.includes('product_file_ids') && !seen.has(href)) {
            seen.add(href);

            // Try to get the filename
            const container = link.closest('.embed') || link.closest('[role="treeitem"]') || link.parentElement;
            const h4 = container?.querySelector('h4');
            const fileName = h4?.textContent.trim() || `File ${downloads.length + 1}`;

            downloads.push({ url: href, name: fileName });
        }
    });

    // Report findings
    console.log(`%c๐Ÿ“‹ Found ${downloads.length} files to download`, 'color: #2196F3; font-size: 14px;');
    downloads.forEach((d, i) => console.log(`   ${i + 1}. ${d.name}`));

    if (downloads.length === 0) {
        console.log('%cโŒ No download links found. Are you on a Gumroad purchase page?', 'color: #f44336;');
        return;
    }

    console.log('โ”'.repeat(50));
    console.log(`%cโฑ๏ธ Starting downloads (${DELAY_SECONDS}s delay between each)...`, 'color: #FF9800;');

    // Download each file
    for (let i = 0; i < downloads.length; i++) {
        const { url, name } = downloads[i];
        const fullUrl = url.startsWith('http') ? url : BASE_URL + url;

        console.log(`%c\n[${i + 1}/${downloads.length}] ${name}`, 'color: #4CAF50; font-weight: bold;');

        downloadFile(fullUrl);

        if (i < downloads.length - 1) {
            console.log(`   Waiting ${DELAY_SECONDS}s...`);
            await sleep(DELAY_SECONDS);
        }
    }

    // Done!
    console.log('\n' + 'โ”'.repeat(50));
    console.log('%cโœ… All downloads started!', 'color: #4CAF50; font-size: 16px; font-weight: bold;');
    console.log('%c๐Ÿ“ Check your browser downloads folder.', 'color: #2196F3;');
})();

@niilevv
Copy link

niilevv commented Mar 8, 2026

Something updated that worked for me in 02.2026.

Just copy & paste into your browser console while being on the Gurmoad downloads page

worked like a charm thanks!(08/03/2026)
I am a bit puzzled how there is no bulk zip download available on gumroad for each Bundle of purchased Files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment