Guide Forum Post Downloader - Tampermonkey Script

SimpCity

Staff
Mar 11, 2022
370
120,542
2,177
0fya082315al84db03fa9bf467e3.png
Introduction

This script can download the contents of many posts on the forum including locally hosted attachments and files on some external hosts such as jpg.church, pixl, cyberdrop, bunkr, pixeldrain and others.

The script adds a download button alongside every post and a download all button at the top of every page which will download every post on the page.

Buttons Added.JPG







Installation


- Install the tampermonkey extension
Please, Log in or Register to see links and images


- Click on the icon up near the web address bar (1) (you may have to click the puzzle piece to see it if its hidden) and then select 'Create a new script...' (2)
Install 1.png

- Paste in the latest version of the script
Please, Log in or Register to see links and images
into the editor field overwriting the default template
Install 2.JPG

- Select File then Save
Install 3.JPG

- Go to settings (1), change 'Config mode' to 'Advanced' (2)
Install 4.png

- Then scroll down to 'Downloads BETA' (1) and change the option to 'Browser API' (2)
Install 5.png

You should then see a download button alongside every post and at the top of every thread on the forum (you need to refresh any open tabs after installing), just hit the download button and the tool will download all media it can from the post/thread.







Weird Zip Names


If zips download with a weird filename i.e. f81dfbdc-eb8b-4b37-8bb5-5100d498e2f6.zip then you should disable any download managers such as downthemall, free download manager etc., refresh the page and try again
 
Last edited by a moderator:
D

Deleted member 916714

Guest
0fya082315al84db03fa9bf467e3.png
POKI PR created:
Please, Log in or Register to see links and images

For the impatient:
Please, Log in or Register to see links and images


v2.2.0

Features
:

- Flatten: Don't create sub-directories and places all files in a single directory.
- Skip Duplicates: Skip duplicates based on the filename.
- Generate Links: Creates a links.txt inside generated directory containing all the downloadable links for the post.
- Generate Log: Creates a log of every download inside generated directory.
- Skip Download: Skips download in the browser and generates a links.txt file containing all the downloadable links for the post.
- Password Protected Links: If a host requires password (e.g. GoFile), the script will pick it up from the post and unlock it.
- Download Page: Downloads all downloadable posts on the current page. You have the ability to choose which posts to download.
- Host Selection: You can now choose which host(s) to download the media from. At-least one host must be checked.
- Hosts: 23 hosts are tested and working. You can now download public Instagram profiles.

Please, Log in or Register to see links and images
Please, Log in or Register to see links and images


Tested on Chrome, Firefox and Brave browsers.

Supported Hosts:


[✓] jpg.church 🢒 https://simpcity.su/threads/alexis-clark.15203/post-1160129
[✓] ibb.co 🢒 https://simpcity.su/threads/martina-raja-tosi.105401/post-1065693
[✓] imgbox.com 🢒 https://simpcity.su/threads/sirena-mysirenaofc.63488/post-478107
[✓] reddit.com 🢒 https://simpcity.su/threads/lena12.10427/post-17564
[✓] twitter.com 🢒 https://simpcity.su/threads/echiechimykanojo.112213/post-1173588
[✓] pixl.li 🢒 https://simpcity.su/threads/lillyroma1982-lilly-roma.13466/post-1170354
[✓] pixhost.to 🢒 https://simpcity.su/threads/emily-ratajkowski.11090/post-889542
[✓] imagebam.com 🢒 https://simpcity.su/threads/xobondaixo-bella-bondai.64960/#
[✓] saint.to 🢒 https://simpcity.su/threads/audrey-bradford-dreybradford.13355/post-1144820
[✓] gfycat.com 🢒 https://simpcity.su/threads/grace-boor.10153/post-1170389
[✓] box.com 🢒 https://simpcity.su/threads/nataliarose2020-hotwethailey.38931/post-888139
[✓] redgifs.com 🢒 https://simpcity.su/threads/movies-and-tv-scenes.63781/post-1041255
[✓] bunkrr.su 🢒 https://simpcity.su/threads/movies-and-tv-scenes.63781/post-1041380
[✓] pixeldrain.com 🢒 https://simpcity.su/threads/jessi-callahan-babygirl-honeybun.26041/post-1170383
[✓] anonfiles.com 🢒 https://simpcity.su/threads/julieta-yanez-ters29.94204/post-1170305
[✓] gofile.com 🢒 https://simpcity.su/threads/dakota-tyler-dakotatylerxxx.33609/post-1136725
[✓] *Blacklisted site* 🢒 https://simpcity.su/threads/taylor-jay-xtaylorjayx.6209/post-659827
[✓] cyberfile.su 🢒 https://simpcity.su/threads/brazzyblondebhabie-aubrey-chesna.12405/post-1170196
[✓] cyberdrop.me 🢒 https://simpcity.su/threads/sophxof.43374/post-250161
[✓] pornhub.com 🢒 https://simpcity.su/threads/arya-fae-aryafae710.111893/post-1168184
[✓] noodlemagazine.com 🢒 https://simpcity.su/threads/arya-fae-aryafae710.111893/post-1168184
[✓] spankbang.com 🢒 https://simpcity.su/threads/joi-jerk-off-instructions-thread.56850/post-1170472

Installation:

1. Install the Tampermonkey browser extension: (
Please, Log in or Register to see links and images
) (
Please, Log in or Register to see links and images
) (
Please, Log in or Register to see links and images
)
2. Important: Under the tampermonkey settings, set the Config mode to Advanced and enable the Browser API in Download Mode (BETA).
3. Copy the contents of
Please, Log in or Register to see links and images

4. Create a new Tampermonkey script and paste the contents you copied in step 3 (build.js).
5. Save the script (Ctrl+S).
6. Visit any thread to verify the script installation.

GoFile Configuration:

By default, the script will create an account and obtain the token. If for some reason, the token doesn't work (GoFile downloads will stop working), perform the following steps to configure a custom token:

1. Create a free GoFIle account here:
Please, Log in or Register to see links and images
.
2. Once the account is verified, copy the API Token at the bottom of the page.
3. Open the script and paste the API Token under settings.hosts.goFile.token as shown below.
4. Save the script.

Please, Log in or Register to see links and images


Known Issues:

- Pornhub support is experimental. yt-dlp is having issues with it as well. Their workaround is to use 3.10+:
Please, Log in or Register to see links and images
- While we're not using Python, the problem appears to be the same: 403s
- Bunkr starts to fail after a while on Chrome and restarting Chrome fixes it. If you can't restart Chrome, use Firefox.

Changelog:

Please, Log in or Register to see links and images
:

1. Fix filenames on Windows

Please, Log in or Register to see links and images
:

1. Do not use custom dir for Firefox

Please, Log in or Register to see links and images
:

1. Add support for direct imgur images
2. Simplify the download directory to thread_title/post_number

Please, Log in or Register to see links and images
:

1. Flatten: Don't create sub-directories and places all files in a single directory
2. Skip Duplicates: Skip duplicates based on the filename
3. Generate Links: Creates a links.txt inside generated directory containing all the downloadable links for the post
4. Generate Log: Creates a log of every download inside generated directory
5. Skip Download: Skips download in the browser and generates a links.txt file containing all the downloadable links for the post
6. Password Protected Links: If a host requires password (e.g. GoFile), the script will pick it up from the post and unlock it
7. Download Page: Downloads all downloadable posts on the current page. You have the ability to choose which posts to download
8. Host Selection: Choose which host(s) to download the media from
9. Fix old post settings and filtered hosts being used when bulk downloading (download page)
10. Create a setting for labeling the toggle all checkbox
11. Update the parent path for every download
12. Fix imagebam (requires an expires cookie)
 
Last edited:

WrangledHog

Diamond Tier
Mar 11, 2022
70
785
929
0fya082315al84db03fa9bf467e3.png
Fantastic work! Love all the extra features. Fancy!

I have a bug report though. The "flatten" checkbox doesn't do anything. Unless I have false expectations. Unchecked should be like the old behaviour putting each zip into a folder named after the thread title, right? That doesn't work. The zip land directly in the default DL folder instead.

E: That's on Firefox 107.0b8 with Tampermonkey 4.17.6161
 
Last edited:

POKI

Broke Boi
Mar 8, 2022
1,710
108
17,058
1,522
0fya082315al84db03fa9bf467e3.png
Please, Log in or Register to view quotes
This is genuinely amazing, thank you so much. Works brilliantly on every host / post I've tested.

I am having the same issue as WrangledHog where every zip is downloaded to my downloads folder all at the same level and not a folder per thread which helps with sorting the files later. I'm uising Chrome 107.0.5304.88 Tampermonkey version 4.18.0. Is that design intent or a bug?
I'll merge this PR in tomorrow when you've had a chance to respond to this question, I dont want to upset too many expecting folders per thread

And I have one small improvement suggestion (being picky with this one) which is to write 'select all' or 'download all' alongside the first entry in the filter list for both individual posts and entire page
Capture.PNG


Again, thank you so much for this :pepoLove:
 
Last edited:
  • Like
Reactions: oOD4rkL0rdOo

silveth

Bathwater Drinker
Mar 11, 2022
66
1,722
1,239
0fya082315al84db03fa9bf467e3.png
I noticed something on Firefox outside of the flatten/folder download issue. If you do not see the Download button show up then you should check the Run at setting for the script. It seems that default can cause it to run at document-start. This causes a TypeError because the script is trying to create the buttons before the body of the page loads. If you change the setting to Run at either Document-body or Document-end the download buttons should show up on the page top and on all the posts.

For anyone that needs, Open Tampermonkey, Click on the script name and then go to the settings tab. You should see the "Run at" drop down in the General area which is the first set of setting on the page.

The script also works on the newer version of Tampermonkey in Firefox. I am currently testing it using the latest beta and it is not having the download issues like the previous version.

Overall, great job on the rewrite. Thank you for putting in your time and effort on this. It is a massive improvement in options and extras.
 

thatsmyfetishnosrsly

Bathwater Drinker
Mar 11, 2022
561
10,271
1,547
0fya082315al84db03fa9bf467e3.png
Please, Log in or Register to view quotes
Yep same issue here. The script works as intended though, despite this really handy bug.

Downloaded a post of a single file, which just downloaded normally via the download app on browser(firefox) into the root download folder, rather than zipped and into a folder made of the name of the thread title.

If this one last thing could be solved, this will be awesome. Great work.
 

thatsmyfetishnosrsly

Bathwater Drinker
Mar 11, 2022
561
10,271
1,547
D

Deleted member 916714

Guest
0fya082315al84db03fa9bf467e3.png
Please, Log in or Register to view quotes

Thank you. Flatten doesn't work on the root directory level. Instead, if an album is part of the download and Flatten is checked, it will not create a sub-directory for that album. Rather, it'll put it all in the same directory.

Please, Log in or Register to view quotes

Thanks! That was sort of a design intent. This is the first time I've worked with Tampermonkey so I looked for the possibility of pointing to an arbitrary location in the FS (not just relative to the current default download location of the browser). Found that it can only be relative and didn't see any point in that.

This is now fixed.

For the checkbox label, you can now set the title yourself inside the settings object: settings.ui.checkboxes.toggleAllCheckboxLabel

Please, Log in or Register to view quotes

Thanks and that bug shouldn't be there since everything is added / run inside the DOMContentLoaded handler. Hasn't happened too me once in Firefox.

Please, Log in or Register to view quotes

Thanks and the download path issue is now fixed and pushed.

Updated script can be copied from here:
Please, Log in or Register to see links and images


Tested in Chrome (107.0.5304.68)

Edit: Using nested folders broke downloads on Firefox. Do not update if you're using Firefox.
 
Last edited:

thatsmyfetishnosrsly

Bathwater Drinker
Mar 11, 2022
561
10,271
1,547
0fya082315al84db03fa9bf467e3.png
Please, Log in or Register to view quotes
Damn it! Wondered why that has suddenly broke.

Edit. To be honest, as long as it ZIps the files, the added task of it putting it into individual folders is just convenience. At least if zipped you could do that yourself down the line by just extracting all the rars into one pre-named folder.

I'll keep on this roll back until you get around to fixing this for FF, but great work so far.
 
D

Deleted member 916714

Guest
0fya082315al84db03fa9bf467e3.png
v2.2.2:

1. Fix old post settings and filtered hosts being used when bulk downloading (download page)
2. Create a setting for labeling the toggle all checkbox
3. Update the parent path for every download
4. Fix imagebam (requires an expires cookie)

Please, Log in or Register to see links and images

Chrome and Brave browsers should be fine after this update.

Firefox Users: Stop using the script altogether since there's a major bug (#1). I'll update once FF download path issues are fixed.
 

POKI

Broke Boi
Mar 8, 2022
1,710
108
17,058
1,522
0fya082315al84db03fa9bf467e3.png
Please, Log in or Register to view quotes
Merged the pull request, thank you so much :pepoLove:


Two comments:
Putting posts into folders based on page number seems unnecessary, just thread is good. Not sure how to remove this from script (will take me a while to understand it all)
Future feature request: Imgur, there's two different types of imgur post on the forum, those that are just direct image links like this one and embeds like this and this. The old script only supported the direct image link type because embeds were tricky once they became an album.
 
D

Deleted member 916714

Guest
0fya082315al84db03fa9bf467e3.png
Please, Log in or Register to view quotes
- Added support for direct imgur images.
Note: There's no resolution for images like the ones you provided (the assumption is that they're always images) so if you encounter an error with such images, do let me know.

- The second embed is already supported. If you have an example of album embed, do share.
- The directory structure has also been modified to thread_title/post_number.

Created the PR:
Please, Log in or Register to see links and images
 

thatsmyfetishnosrsly

Bathwater Drinker
Mar 11, 2022
561
10,271
1,547
0fya082315al84db03fa9bf467e3.png
Please, Log in or Register to view quotes
I remember seeing the download button not turn up on posts for the pixl picture website? Can't remember what its called now. But it turns up on the rest of the posts but not pictures hosted on this. Refreshed a couple of times too.

QOL Request but no worries if needlessly complicated:

Is there a way to take out the parts of the script that download videos? I normally use the script to download the posts that have a mix of direct embeds and pics but for larger downloads I stick with IDM.

Also, single files(picture files at least) per post still don't seem to ZIP, but 2 & + do.
 

cellshade

Tier 2 Sub
Mar 13, 2022
10
247
434
0fya082315al84db03fa9bf467e3.png
Works incredibly well with the new update on Violentmonkey, thanks a lot for all your hard work!
 

hiezenberg

Bathwater Drinker
Mar 14, 2022
96
4,608
1,239
0fya082315al84db03fa9bf467e3.png
tried it in Android using kiwi browser and works just fine.
 
Last edited: