Last active
May 26, 2024 18:18
-
-
Save mrkrstphr/0ddb2ecf9c15f506eeafbe0aa41da7cf to your computer and use it in GitHub Desktop.
Revisions
-
mrkrstphr revised this gist
May 26, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Copy All HumbleBundle Download Links I frequently buy books and comic books from [HumbleBundle](https://humblebundle.com). It's kind of an obsession, whether I manage to read them all, or not. I also like to use [Motrix](https://motrix.app/) to manage downloading lots of files. HumbleBundle has a bulk download link which just fires off a ton of browser downloads, but I've found that sometimes using that features results in missing a download or two. -
mrkrstphr revised this gist
May 26, 2024 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,6 @@ console.log( Array.from(document.querySelectorAll('.row')) .map((r) => { const links = Array.from(r.querySelectorAll('a')); const cbz = links.find(l => l.href.includes('.cbz'))?.href; const epub = links.find(l => l.href.includes('.epub'))?.href; -
mrkrstphr revised this gist
Nov 12, 2023 . 1 changed file with 13 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,15 @@ console.log( Array.from(document.querySelectorAll('.row')) .map((r) => { const links = Array.from(r.querySelectorAll('a')); console.log(links.map(l => l.href)); const cbz = links.find(l => l.href.includes('.cbz'))?.href; const epub = links.find(l => l.href.includes('.epub'))?.href; const pdf = links.find(l => l.href.includes('.pdf'))?.href; return (cbz || epub || pdf); }) .filter(Boolean) .join('\n') ); -
mrkrstphr created this gist
Oct 3, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # Copy All HumbleBundle Download Links I frequently buy books and comic books from [HumbleBunde](https://humblebundle.com). It's kind of an obsession, whether I manage to read them all, or not. I also like to use [Motrix](https://motrix.app/) to manage downloading lots of files. HumbleBundle has a bulk download link which just fires off a ton of browser downloads, but I've found that sometimes using that features results in missing a download or two. And clicking the download links one-by-one is boring. I just want to get a list of download URLs so I can paste them into Motrix at once and have it manage downloading them. So I wrote a quick snippet to paste into the browser developer tools to find all the download links on any given page and output them to the console so I can copy it. *Note*: the URLs provided by HumbleBundle eventually expire, so don't hold on to the copied links too long without using them. To use, simply change the file type you want in the second join (.epub, .mobi, .pdf, etc), then paste the link in your browsers developer tools. The snippet can probably be modified to get rid of the first filter. Enjoy! This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ console.log( Array.from(document.querySelectorAll('a')) .map((a) => a.href) .filter((h) => h && h.substring(0, 11) === 'https://dl.') .filter(h => h.includes('.epub')) .join('\n') );