Skip to content

Commit

Permalink
actualizacion de servidores
Browse files Browse the repository at this point in the history
  • Loading branch information
Kronos2308 committed Feb 12, 2024
1 parent 21b3c1e commit 667222c
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules
#---------------------------------------------------------------------------------
VERSION_MAJOR := 2
VERSION_MINOR := 8
VERSION_MICRO := 0
VERSION_MICRO := 1

VERSION_EXDAT := 1
APP_TITLE := RipJKAnimeNX
Expand Down
Binary file modified out/RipJKAnimeNX.nro
Binary file not shown.
Binary file modified out/RipJKAnimeNX[05B9DB505ABBE000][v0].nsp
Binary file not shown.
2 changes: 1 addition & 1 deletion romfs/V
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.0
2.8.1
3 changes: 2 additions & 1 deletion romfs/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@
127.0.0.1 *culturedischargenarcotic*
127.0.0.1 *google-analytics*
127.0.0.1 disasterthoughtless.com

127.0.0.1 senselessvillaengineer.com
127.0.0.1 blareclockwisebead.com
85 changes: 54 additions & 31 deletions source/Link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
#include "Networking.hpp"
#include "Link.hpp"
#include "SDLWork.hpp"
//servers
json Servers;
json ServersTMP;
std::vector<std::string> arrayserversbak = {
"Desu","Nozomi","Xtreme S","Okru","MAS...","JKAnime"
};
bool white=false;

std::vector<std::string> arrayservers = arrayserversbak;
const string JkURL = "https://jkanime.net/";

//Private Link decoders
string MixDrop_Link(string Link){
Expand Down Expand Up @@ -153,17 +163,47 @@ string Fembed_Link(string Link) {
return codetemp;
}

//servers
json Servers;
json ServersTMP;
std::vector<std::string> arrayserversbak = {
"Desu","Nozomi","Xtreme S","Okru","MAS...","JKAnime"
};
bool white=false;
bool OneMORE(string content){
string tempcon = "";
try{
//Obtener URL
tempcon = scrapElement(content, "https://c4.jkdesu.com/servers/","'");
if(tempcon.length() < 5) {
tempcon = "https://c4.jkdesu.com" + scrapElement(content, "/servers/","'");
}

//Obtener info de la URL
cout << "Mas Servers." << tempcon << endl;
tempcon = Net::GET(tempcon);
tempcon = scrapElement(tempcon, "[","]") + "]";
cout << "Mas Servers.." << tempcon << endl;

std::vector<std::string> arrayservers = arrayserversbak;
const string JkURL = "https://jkanime.net/";
/*
replace(tempcon, "var servers = ", "");
replace(tempcon, "var servers =", "");
replace(tempcon, "var servers=", "");
cout << "Mas Servers..." << tempcon << endl;
*/
//destasar el json
if(json2ob (tempcon,Servers)){
// even easier with structured bindings (C++17)
for (auto& [key, value] : Servers.items()) {
//std::cout << key << " : " << value["server"] << "\n";
std::cout << value["server"] << "::" << value["slug"] << endl;;
string sourcename = string("_")+value["server"].get<string>();
ServersTMP[sourcename] = value["slug"].get<string>();
arrayservers.push_back(sourcename);
}
cout << std::setw(4) << ServersTMP << std::endl;
}
} catch(...) {
std::cout << "Error cap server... " << std::endl;
return false;
}
return true;
}

// Public Func
bool onlinejkanimevideo(string onlineenlace,string server){
if (!Net::HasConnection()) {return false;}
string videourl = "";
Expand All @@ -176,6 +216,10 @@ bool onlinejkanimevideo(string onlineenlace,string server){
//https://jkanime.net/c3.php?u=7bc30453dVj8i&s=voe
string Videored = string("https://c4.jkdesu.com/e/") + ServersTMP[server].get<string>();
videourl = Net::REDIRECT(Videored,"");
if(videourl.length()) {
videourl = "https://stardustcfw.github.io/player.html#" + string_to_hex(videourl);
}

//replace(videourl, "mdfx9dc8n.net", "mixdrop.ag");
white=true;
}
Expand All @@ -190,28 +234,7 @@ bool onlinejkanimevideo(string onlineenlace,string server){

if (server == "MAS...") {
arrayservers.erase(arrayservers.begin()+arrayservers.size());
tempcon = scrapElement(content, "https://c4.jkdesu.com/servers/","'");
cout << "Mas Servers..." << tempcon << endl;
tempcon = Net::GET(tempcon);
cout << "Mas Servers..." << tempcon << endl;
try{

if(json2ob (tempcon,Servers)){
// even easier with structured bindings (C++17)
for (auto& [key, value] : Servers.items()) {
//std::cout << key << " : " << value["server"] << "\n";
std::cout << value["server"] << "::" << value["slug"] << endl;;
string sourcename = string("_")+value["server"].get<string>();
ServersTMP[sourcename] = value["slug"].get<string>();
arrayservers.push_back(sourcename);
}
cout << std::setw(4) << ServersTMP << std::endl;
}
} catch(...) {
std::cout << "Error cap server... " << std::endl;
}


OneMORE(content);
arrayservers.push_back("JKAnime");
}
if (server == "Fembed 2.0") {
Expand Down
2 changes: 1 addition & 1 deletion source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "extra.hpp"
#include "input.hpp"
//make some includes to clean a little the main
string urlc = "https://myrincon.duckdns.org";
string urlc = "https://myrincon.es";

//MAIN INT
int main(int argc, char **argv)
Expand Down

0 comments on commit 667222c

Please sign in to comment.