Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
emuparadise.me download workaround (Most games + Sega Dreamcast, Books/Comics/Guides/Magazines)
// ==UserScript==
// @name EmuParadise Download Workaround
// @version 1.2.2
// @description Replaces the download button link with a working one
// @author infval (Eptun)
// @match https://www.emuparadise.me/*/*/*
// @grant none
// ==/UserScript==
// https://www.reddit.com/r/Piracy/comments/968sm6/a_script_for_easy_downloading_of_emuparadise_roms/
(function() {
'use strict';
// Others: 50.7.189.186
const ipDownload = "50.7.92.186";
const urlFirstPart = "http://" + ipDownload + "/happyxhJ1ACmlTrxJQpol71nBc/";
var platform = document.URL.split("/")[3];
if (platform == "Sega_Dreamcast_ISOs") {
let downs = document.querySelectorAll("p > a[title^=Download]");
for (let i = 0; i < downs.length; i++) {
let findex = 9; // "Download X"
let lindex = downs[i].title.lastIndexOf(" ISO");
downs[i].href = urlFirstPart + "Dreamcast/" + downs[i].title.slice(findex, lindex);
}
}
// match https://www.emuparadise.me/magazine-comic-guide-scans/%NAME%/%ID%
else if (platform == "magazine-comic-guide-scans") {
const webArchiveURL = "https://web.archive.org/web/2016/";
let down = document.querySelectorAll("#content > p")[0];
down.innerHTML = "Getting Download URL...";
let req = new XMLHttpRequest();
req.open('GET', webArchiveURL + document.URL, false);
req.send(null);
if (req.status == 200) {
let lindex = req.responseText.indexOf("Size: ");
let findex = req.responseText.lastIndexOf("http://", lindex);
let urlLastPart = req.responseText.slice(findex, lindex).match(/\d+\.\d+\.\d+\.\d+\/(.*)"/)[1];
urlLastPart = urlLastPart.replace(/ /g, "%20"); // encodeURI() changes #, e.g. Sonic - The Comic Issue No. 001 Scan
down.innerHTML = "<a href=" + urlFirstPart + urlLastPart + ">Download</a>";
}
else {
let info = document.querySelectorAll("#content > div[align=center]")[0];
let filename = info.children[0].textContent.slice(0, -5); // "X Scan"
let cat = {
"Gaming Comics @ Emuparadise": "may/Comics/",
"Gaming Magazines @ Emuparadise": "may/Mags/"
}[info.children[1].textContent] || "";
// URLs with # except The Adventures Of GamePro Issue
down.innerHTML = "Error when getting URL: " + webArchiveURL + document.URL
+ "<div>Try "
+ "<a href=" + urlFirstPart + cat + encodeURIComponent(filename) + ".cbr" + ">cbr</a> or "
+ "<a href=" + urlFirstPart + cat + encodeURIComponent(filename) + ".rar" + ">rar</a>"
+ "</div>";
}
}
else {
let id = document.URL.split("/")[5];
let downloadLink = document.getElementsByClassName("download-link")[0];
let div = document.createElement("div");
div.innerHTML = `<a target="_blank" href="/roms/get-download.php?gid=` + id
+ `&test=true" title="Download using the workaround script">Download using the workaround script</a>\
(Middle-click or Right-click -> New tab/window)<br/>\
You have to change a URL protocol to HTTP! Example: <b>https</b>://50.7.189.186/.../Mario.7z -> <b>http</b>://50.7.189.186/.../Mario.7z`;
downloadLink.insertBefore(div, downloadLink.firstChild);
}
})();
@infval

This comment has been minimized.

Copy link
Owner Author

infval commented Apr 21, 2019

Use Firefox for downloading Books/Comics/Guides/Magazines!

@FrankEBailey

This comment has been minimized.

Copy link

FrankEBailey commented May 19, 2019

This doesn't appear to be working anymore, I've tried in both Firefox and Chrome, and neither magazines or guides seem to be getting further than "getting download URL". I hope I'm just doing something wrong...?

@ELCoquiNinja

This comment has been minimized.

Copy link

ELCoquiNinja commented May 24, 2019

Didn't work on firefox but it did work on chrome for me with tampermonkey, Didn't even have to right click to open in new tab or anything, i just clicked on the regular direct download link like the good old days and voila

@FrankEBailey

This comment has been minimized.

Copy link

FrankEBailey commented May 25, 2019

Didn't work on firefox but it did work on chrome for me with tampermonkey, Didn't even have to right click to open in new tab or anything, i just clicked on the regular direct download link like the good old days and voila

So can you download this? https://www.emuparadise.me/magazine-comic-guide-scans/Official_Sega_Saturn_Magazine_001_-_Nov_1995_(UK)/1152 if you are able to, please share the exact script you're using in Tampermonkey on Chroms if you don't mind.

@Stiletto71

This comment has been minimized.

Copy link

Stiletto71 commented Jun 7, 2019

Is there a way that Zorlon's PSX Mods can be made to work at some point?

@chasburger

This comment has been minimized.

Copy link

chasburger commented Jun 11, 2019

So can you download this? https://www.emuparadise.me/magazine-comic-guide-scans/Official_Sega_Saturn_Magazine_001_-_Nov_1995_(UK)/1152 if you are able to, please share the exact script you're using in Tampermonkey on Chroms if you don't mind.

No, it doesn't seem to work with Tampermonkey on Chrome for downloading scans. The author suggests to use Firefox and Greasemonkey for those types of downloads. I tried that download you linked to on my end with Firefox ver. 67.0.2 and Greasemonkey ver. 4.8 and it worked just fine!

Internet Archive has as fairly decent selection of gaming magazine scans and all sorts of other cool retro gaming media if you can't get this to work, by the way.

@infval

This comment has been minimized.

Copy link
Owner Author

infval commented Jun 16, 2019

Didn't work on firefox but it did work on chrome for me with tampermonkey, Didn't even have to right click to open in new tab or anything, i just clicked on the regular direct download link like the good old days and voila

So can you download this? https://www.emuparadise.me/magazine-comic-guide-scans/Official_Sega_Saturn_Magazine_001_-_Nov_1995_(UK)/1152 if you are able to, please share the exact script you're using in Tampermonkey on Chroms if you don't mind.

Yes. Use Firefox or Chrome with --disable-web-security arg (info).

Is there a way that Zorlon's PSX Mods can be made to work at some point?

https://www.emuparadise.me/roms/psxmods/
I have used archive.org and http://50.7.92.186/happyxhJ1ACmlTrxJQpol71nBc/.
Zelda Cartoon Collection Vol.1 (U) [SLUS_001EP]
1, 2, 3, 4, 5, 6, NFO
Resident Evil Directors cut PSX (Uncut)
1, 2, 3, 4
Wesker Report (U) [SLUS_008EP]
1, 2, 3, 4, 5, NFO
Monopoly [Emuparadise Special] (U) [SLUS_100EP]
1, 2, 3, NFO

@FrankEBailey

This comment has been minimized.

Copy link

FrankEBailey commented Jun 17, 2019

I can confirm that Firefox with Greasemonkey does work on that Sega Saturn mag URL I linked up-thread. Not sure why it wasn't working before, but hey-ho, it's working now, yay! Thanks!

@V4nkor

This comment has been minimized.

Copy link

V4nkor commented Jun 19, 2019

I'm on chrome and when I try to download with the workaround by middle mouse clicking, it just redirects me to the page of the download and it adds #Download&test=true at the end of the URL
EDIT: never mind, for some obscure reason it worked.

@Chaoz190790

This comment has been minimized.

Copy link

Chaoz190790 commented Aug 27, 2019

Works perfectly, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.