Skip to content

Instantly share code, notes, and snippets.

@vitezfh
Last active April 14, 2024 04:12
Show Gist options
  • Save vitezfh/86f8867013f9b1305b3933eab2cc29a5 to your computer and use it in GitHub Desktop.
Save vitezfh/86f8867013f9b1305b3933eab2cc29a5 to your computer and use it in GitHub Desktop.
#! /bin/bash
url="https://gumroad.com/d/7b65cbcb5004935ce63bdd4cdd22ccba"
button_links=$(curl -c ./cookies-gumroad-com.txt -b ./cookies-gumroad-com.txt $url -L -Ss | grep '"download_click" data-url="' | awk '{print $7}' | cut -d '"' -f2)
# Possible replacement: button_links=$(curl -c ./cookies-gumroad-com.txt -b ./cookies-gumroad-com.txt $url -L -Ss | grep -oP '(?<=download_click" data-url=").*?(?=")')
for link in $button_links; do
curl --limit-rate 4000k -C - "gumroad.com$link" -L -c ./cookies-gumroad-com.txt -b ./cookies-gumroad-com.txt \
-o "mde_paywall/$(awk -F '/' '{print $4}' <<< $link).mp4"
#Possible replacement: wget -P mde_paywall -nd -r -l 1 -H -D files.gumroad.com -A mp4,webm "gumroad.com$link" --load-cookies="cookies-gumroad-com.txt" --save-cookies="cookies-gumroad-com.txt"
done
@cco
Copy link

cco commented Oct 14, 2020

Seems the issue is that they limit the ability to archive entire content libraries based on the size, so after x amount they stop offering that feature. Seems like I'll have to play around in phantomjs and get around the javascript issues.

@gatekeepr
Copy link

gatekeepr commented Oct 24, 2020

Hello everyone, made a quick gist using python to accomplish this, only tested it with the mde gumroad but should work for every other mp4 based gumroad. If you have any issues lmk.

https://gist.github.com/gatekeepr/97d6244dc074280b32f505443fbd7fe6

EDIT: fixed extension but could break on special characters in filenames that interfere with the path (only removing : due to it breaking on linux, let me know if you find others)

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