Guide Forum Post Downloader - Tampermonkey Script

SimpCity

Staff
Mar 11, 2022
370
120,535
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:

oOD4rkL0rdOo

Tier 3 Sub
Mar 12, 2022
15
300
534
0fya082315al84db03fa9bf467e3.png
I have an issue with bunker.is album. Some files are not downloaded correctly. Bunker.is redirect bunkrr.su/v/ sometime to bunkrr.su and the images are broken. Is it possible to exclude the image files lkinks?
 
Last edited:

oOD4rkL0rdOo

Tier 3 Sub
Mar 12, 2022
15
300
534
0fya082315al84db03fa9bf467e3.png
Please, Log in or Register to view quotes
wrong script? sorry forgot links after image files.

[/bunkrr.su\/a\//], async (url, http) => { const { source, dom } = await http.get(url); let resolved = []; const props = JSON.parse(dom?.querySelector('#__NEXT_DATA__')?.innerHTML || {}); if (props.props && props.props.pageProps && props.props.pageProps.album && props.props.pageProps.album.files) { resolved = props.props.pageProps.album.files.map(file => `${file.cdn.replace('cdn', 'media-files')}/${file.name}`); } return { dom, source, folderName: dom.querySelector('#title').innerText.trim(), resolved, }; },
---------------------------------------------------------------------------------------------------

resolved = props.props.pageProps.album.files.map(file => `${file.cdn.replace('cdn', 'media-files')}/${file.name}`);
Is it possible that all image files links doesn't replace the cdn with media-files?
If you replace cdn with media files, all image files will be downloaded without any problems, but all movie files will be broken.
 

oOD4rkL0rdOo

Tier 3 Sub
Mar 12, 2022
15
300
534
0fya082315al84db03fa9bf467e3.png
I want to download the image and movie files. If it is an image file, don't change the download link and if it is a movie or other file type, change cdn to media-files.
Possible to fix it easily, but java script is too big head for me.
Yes i know cyberdrop-d, but this script is very useful.
 

cellshade

Tier 2 Sub
Mar 13, 2022
10
247
434
0fya082315al84db03fa9bf467e3.png
Please, Log in or Register to view quotes
Nope, don't think I changed anything. I'm using version 2.13.3, and all I did was copy and paste the script into the Violentmonkey editor. Before this, I was having issues with FileSaver.js downloading the files (judging from the console output), but it got fixed entirely.
 

BraveB2

Lurker
Mar 12, 2022
7
11
138
0fya082315al84db03fa9bf467e3.png
Ok, so it looks like I discovered a potential bug on Firefox 106.0.4 on Fedora 36. The browser console returns this error
Code:
Please, Log in or Register to view codes content!
 

POKI

Broke Boi
Mar 8, 2022
1,709
108
17,058
1,522
0fya082315al84db03fa9bf467e3.png
x111000111 who did the recent great update to the script has deleted his account so I'm now trying to fix the small bugs people have found.

Here's a status update which I'll edit as I go

Fixed, coming in next release:
  • pixl is -> li
  • twitter images (twimg) - improved regex
  • pixeldrain filename and extension thing
  • Multiple ibb issues:
    • Doesn't download full res for linked embeds - changed which element it looks for in the request response
    • Non-linked embeds are ignored - they are now downloaded properly, this required the longest line of regex I've ever written :LUL

To do:
  • Multiple ibb issues:
    • Doesn't download full res for albums, I think the script needs to request each image page rather than just regex.
  • bunkr images - I've not found an album with the issue, oOD4rkL0rdOo can you give an example please (although tbh, isnt necessary). This should be regexable I just need to understand what all this pageprops stuff is doing.
 
Last edited:

POKI

Broke Boi
Mar 8, 2022
1,709
108
17,058
1,522
0fya082315al84db03fa9bf467e3.png
Version 2.2.7 released

Things fixed or changed

  • Pixl domain changed from .is to .li
  • Twitter image bug fixed
  • Pixeldrain lack of filename and extension bug fixed
  • ibb - full res for linked embeds now downloaded
  • ibb - non-linked embeds now downloaded
  • Changed reaction given to peepolove
Bugs that still remain
  • ibb albums downloads low res preview images
Future Enhancements?
  • bunkr images still use media-files, change to just use the cdn# / i# link

I dont know if the auto update function is working, if not you can find the latest script here:
Please, Log in or Register to see links and images


New bugs found since release
  • Multiple pixeldrain albums in one post, only downloads one i.e. https://simpcity.su/threads/mikayla-demaiter.10203/post-49999
  • Doesn't download attachments not inserted into post and has extension issue for those it does
  • No cyberdrop support
  • Pixl images with no server number i.e. i.pixl.li are not downloaded - easy regex fix
  • Nitter not supported
  • Cyberfile changed to .su
 
Last edited:

MrSparkle9

Bathwater Drinker
Mar 11, 2022
244
13,678
1,402
0fya082315al84db03fa9bf467e3.png
I can't seem to get this to work in Chrome Incognito mode. Is that expected?
 

Tublecane

Lurker
Apr 2, 2022
4
5
58
0fya082315al84db03fa9bf467e3.png
In case this is an issue for anyone:
Under normal circumstances this script is great, and downloads each post as a numbered zip file, in a folder with the name of the thread. Amazing.

However IF you happen to have the DownThemAll extension enabled:
It will download every post into its own randomly (hex?) code named zip files in the root directory of your downloads folder. Boo.

(Issue experienced on Chrome on OSX, not in incognito)
 
Last edited:
  • Like
Reactions: TheStubborn

xxxhub

Bathwater Drinker
Mar 11, 2022
126
3,371
1,249
0fya082315al84db03fa9bf467e3.png
How come when I try to download some posts that has about 10 pictures for example, it just downloads a pictured called "banner-c" which has the site logo and says "Page crawled from simpcity.su forums"