Skip to content

Instantly share code, notes, and snippets.

@infval
Last active October 30, 2024 01:59
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 Oct 2, 2021

I have the same problem the script does not work for me in the browser opera today October 1, 2021 when I click it, the window closes by itself and does not download anything and does nothing

@khtp
Copy link

khtp commented Oct 2, 2021

I am using the tampermonkey and it opera

@CorrodedSanctuary
Copy link

CorrodedSanctuary commented Dec 18, 2021

Doesn't seem to work anymore. Redirects to a new tab to show the server error. Used the script on the same machine, and it worked fine. Different host errors depending on the platform, like psx2psp psxredump or may (sega mega drive). "Save link as" also doesn't work, shows "Error: network error" in chrome and "unknown error" in firefox

image
image

@papperdaemon
Copy link

@CorrodedSanctuary already tried that. but even if it did work - that seems like too much of a hustle for a single download

@Stiletto71
Copy link

Stiletto71 commented Dec 23, 2021 via email

@CorrodedSanctuary
Copy link

@Stiletto71 I tried installing fdm on my desktop, and then tried saving the link again with firefox, and it worked for some reason, I just had to "allow download" in the firefox menu, FDM didn't catch that. Idk how, but the problem just fixed itself. Thank you for your suggestions lads, I'll try it next time

Copy link

ghost commented Jan 22, 2022

fine, i know how to downlaod Dreamcast iso's.
frist, you select a ps2 games, then download it, and now, stop it. then view like url link frist of ip address.
then, goto Dreamcast game page, right click and copy server original link. (mayabe this is x.x.x./"random string"/Dreamcast/"gamename.zip")
now! replace this original linke's x.x.x.x ip to ps2 game linke's ip.
final, paste this like to any download client. download it!

i test it on 2022.01.22.
ps2 game is: https://www.emuparadise.me/Sony_Playstation_2_ISOs/Transformers_-_Revenge_of_the_Fallen_(Europe)_(En,Fr,De,Es,It)/154736
dc gdi game is: https://www.emuparadise.me/Sega_Dreamcast_ISOs/House_of_the_Dead_2,_The_(USA)/74

it work fine.

@khtp
Copy link

khtp commented Jan 23, 2022

@Visntse
image

http://154736/happyUUKAm8913lJJnckLiePutyNak/Dreamcast/House%20of%20the%20Dead%202,%20The%20(USA).zip << when placing the link in my web browser it does not detect it http://154736/happyUUKAm8913lJJnckLiePutyNak/Dreamcast/House%20of%20the%20Dead%202,%20The%20(USA).zip << this string is from your example using that games, is this what you mean? Could you provide me with an example, because more or less I understood him, another question, how do I eliminate the % and 20 that appear? When I copy the link and paste it in a notepad as in the photo, this appears, and I don't know what you mean by pasting it in a download client

@khtp
Copy link

khtp commented Jan 23, 2022

@Visntse
when I want to download a dreamcast game with the active script, the server that it has no longer works and when I copy the link of the ps2 game the ip of that game does not appear, only the id but not the ip

image

@inukaze
Copy link

inukaze commented Jan 23, 2022

Just edit the script and make a simple change of constant ip, like :

  // Others: 50.7.189.186
  //ORIGINAL-LINE//const ipDownload = "50.7.92.186";
  const ipDownload = "162.210.194.49";  

001

After of do that save the script and reload page with F5 or Ctrl+F5 or Ctrl + R, i think if possible you can download DC titles, just notice the IP is the new value :
002

Click the link of your prefer, and wait the modification works XD. for see the save dialog
003

Select Save option and accept, and the download should be start
004

You can try with the another link just for try the script is working fine, again just notice is the right ip
005

wait for the save dialog appears, select save and accept
006

and the download should be start, i hope this work for yours.
007

Thank you very much for this script is really useful

@filevans
Copy link

filevans commented Jan 23, 2022

hello, this edit only works on 1.2.3, I'm using 'Emuparadise fix' 1.3.1 and that doesn't have the secondary download link nor does it show the IP, it just has one download link which works for ps2games but not for dreamcast games

db442fa4-70a6-433b-9306-687fbba1a5f6

f5bdee39-4dc9-4c7f-9400-21e3997aa1c1

Right click and choose 'save as' ....

d61a3d42-2395-469a-8bc1-a7e5f9530e67

@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)

@aprixnox
Copy link

errors in line 55 and 56? causing the script to not run

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