Skip to content

Instantly share code, notes, and snippets.

@infval
Last active April 10, 2024 23:22
Show Gist options
  • Save infval/c69b479ff0bd590f2dd7e1975fe2fcad to your computer and use it in GitHub Desktop.
Save infval/c69b479ff0bd590f2dd7e1975fe2fcad to your computer and use it in GitHub Desktop.
emuparadise.me download workaround (Most games + Sega Dreamcast, Books/Comics/Guides/Magazines)
// ==UserScript==
// @name EmuParadise Download Workaround
// @version 1.2.3
// @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 + "/happyUUKAm8913lJJnckLiePutyNak/";
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>`;
downloadLink.insertBefore(div, downloadLink.firstChild);
}
})();
@khtp
Copy link

khtp commented Jan 23, 2022

@filevans what is that script or github that mentions I can't find it, could you provide it, this script works for me and read the previous comment, that solves the problem with dreamcast and it already worked for me

@filevans
Copy link

filevans commented Jan 23, 2022

@khtp yes I got it working now using 1.2.3, edited it with the IP address lines as above, working on Dreamcast games finally! It doesn't work on the newer script 1.3.1:

https://greasyfork.org/en/scripts/415598-emuparadise-fix

@bobster69
Copy link

@filevans Works like a charm. Thank you for your effort. :)

Copy link

ghost commented Jan 31, 2022

okay, maybe @inukaze tell's can be work.
my way like @inukaze
i mean you frist download ps2 game, then you can see this game download link. (i use idm download client.)
this link start with some ip...
and now, go to dc game page. scroll page to download content, right click mouse to copy page display dc game iso url.
then past this url to notepad, then replace this url start ip with ps2 game iso url start ip.

like this:

  1. ps2 game url: x.x.x.x/somecode/ps2/ps2iso.iso
  2. dc game url: y.y.y.y/somecode/dc/dciso.iso
  3. replace y.y.y.y to x.x.x.x
  4. final can be download url link: x.x.x.x/somecode/dc/dciso.iso
    and now, copy step 4 link to any download client, down it, it will be work.

by the way, i use this INFVAL 1.2.3 script. and so funny~ why u don't use this? why u want use old script?
my mother language isn't english, so... sorry for some language type errors.

@dimon8x
Copy link

dimon8x commented Nov 27, 2023

v1.2.3 works in Opera 104 for me only in November 2023.

@EyeDaGod
Copy link

EyeDaGod commented Jan 1, 2024

v1.2.3 works in Opera 104 for me only in November 2023.

I've tried this on Chrome 120 and Opera 106 both on windows 10 and no luck..

@vinnom
Copy link

vinnom commented Jan 1, 2024

v1.2.3 works in Opera 104 for me only in November 2023.

I've tried this on Chrome 120 and Opera 106 both on windows 10 and no luck..

last week I tried to use it with Brave and also had no luck. It seems something related to Blink engine, because on Firefox it worked fine.

PS: also worked on Waterfox, both using tampermonkey (didn't try greasemonkey)

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