forked from markus/S_New4
v4.1.0 => chanche s.to => serienxtream.sx because s.to has Ddos protection git add .git add .
This commit is contained in:
parent
757ede7b4b
commit
88482acbad
@ -208,7 +208,7 @@ int PageManager::login(Account account)
|
||||
if(debugMode)
|
||||
std::cout << " > Melde mit neuem Account an: Email: " << account.Email << " Passowort: " << account.Password << std::endl;
|
||||
|
||||
std::string html = getServerRequest("https://s.to/login", false, std::string("email=" + account.Email + "&password=" + account.Password), true ).html;
|
||||
std::string html = getServerRequest("https://serienstream.sx/login", false, std::string("email=" + account.Email + "&password=" + account.Password), true ).html;
|
||||
if(html == "" )
|
||||
return 0;
|
||||
else if (html.find("Das Feld Email muss eine gültige E-Mail-Adresse enthalten.") != std::string::npos)
|
||||
@ -237,7 +237,7 @@ std::string PageManager::checkName(std::string Name)
|
||||
{
|
||||
std::string name = replace(Name, " ", "-");
|
||||
|
||||
std::string html = getServerRequest("https://s.to/serie/stream/" + name).html;
|
||||
std::string html = getServerRequest("https://serienstream.sx/serie/stream/" + name).html;
|
||||
if(html.find("Die gewünschte Serie wurde nicht gefunden oder ist im Moment deaktiviert.") != std::string::npos) {
|
||||
std::cout << "\33[2K\r => Error: Die gewünschte Serie wurde nicht gefunden oder ist im Moment deaktiviert: '" << Name << "'" << std::endl;
|
||||
return "-1";
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
|
||||
int writeToFile(std::vector<std::string> paths, std::string text);
|
||||
|
||||
const std::string UrlPraefix = "https://s.to/serie/stream/";
|
||||
const std::string UrlPraefix = "https://serienstream.sx/serie/stream/";
|
||||
std::string sock5Proxy;
|
||||
private:
|
||||
std::string cookieFilePath;
|
||||
|
@ -293,8 +293,8 @@ int loadDefaulOptions(Settings &settings)
|
||||
if(!isNumber(data) ) {
|
||||
std::cout << " => Error_Defaults: Thread-Max Ungültige Zahl: " << data << std::endl;
|
||||
return 18;
|
||||
} else if (settings.maxThreads > 10) {
|
||||
std::cout << " => Error_Defaults: Thread-Max: Zahl größer 10: " << data << std::endl;
|
||||
} else if (settings.maxThreads > 4) {
|
||||
std::cout << " => Error_Defaults: Thread-Max: Zahl größer 4: " << data << std::endl;
|
||||
return 19;
|
||||
}
|
||||
if(settings.debugMode)
|
||||
@ -358,7 +358,7 @@ int unterOption_help(Settings &settings)
|
||||
<< " -> Mit diesem Programm kann man die Download-Urls" << std::endl
|
||||
<< " oder Informationen von Serien bekommen." << std::endl
|
||||
<< " -> Mit diesem Programm kann man Redirect-Links von" << std::endl
|
||||
<< " s.to umwandeln." << std::endl
|
||||
<< " serienstream.sx umwandeln." << std::endl
|
||||
<< std::endl;
|
||||
|
||||
std::cout << "Unteroptionen:" << std::endl
|
||||
@ -374,7 +374,7 @@ int unterOption_help(Settings &settings)
|
||||
<< "\t\"search\"\tModus um Serien zu suchen." << std::endl
|
||||
<< "\t\"info\"\t\tModus um Infos einer Serien zu bekommen." << std::endl
|
||||
<< "\t\"clean\"\t\tModus um Cookie-Files zu löschen." << std::endl
|
||||
<< "\t\"news\"\t\tModus um neusten 75 Folgen auf s.to zu sehen." << std::endl
|
||||
<< "\t\"news\"\t\tModus um neusten 75 Folgen auf serienstream.sx zu sehen." << std::endl
|
||||
<< "\t\"log\"\t\tModus um Log Datei zu sehen / leeren." << std::endl
|
||||
<< std::endl;
|
||||
|
||||
@ -517,8 +517,8 @@ int unterOption_default(Settings *settings, int argc, char ** argv)
|
||||
if(!isNumber(optarg)) {
|
||||
std::cout << " => Error: [-t]: Thread-Max: Ungültige Zahl: " << optarg << std::endl;
|
||||
return 18;
|
||||
} else if (settings->maxThreads > 10 && !settings->debugMode) {
|
||||
std::cout << " => Error: [-t]: Thread-Max: Zahl ist größer 10: " << optarg << std::endl;
|
||||
} else if (settings->maxThreads > 4 && !settings->debugMode) {
|
||||
std::cout << " => Error: [-t]: Thread-Max: Zahl ist größer 4: " << optarg << std::endl;
|
||||
return 19;
|
||||
}
|
||||
if(settings->debugMode)
|
||||
@ -673,7 +673,7 @@ void unterOption_default_help(std::string programName)
|
||||
<< " Thread, bis die angegebene Anzahl an Threads erreicht" << std::endl
|
||||
<< " wurde. Dannm wartet es auf das Enden der Threads und" << std::endl
|
||||
<< " beginnt von vorne. Verwende 0 um das Multihreading zu" << std::endl
|
||||
<< " deaktivieren. Maximal 10 Threads." << std::endl
|
||||
<< " deaktivieren. Maximal 4 Threads. ( s.to hat bereits Ddos Schutz !!! )" << std::endl
|
||||
<< " Standart: 0" << std::endl << std::endl
|
||||
<< "HELPMENUE:" << std::endl
|
||||
<< " -h, --help" << std::endl
|
||||
@ -756,8 +756,8 @@ void unterOption_url_help(std::string programName)
|
||||
std::cout << "Beschreibung:" << std::endl
|
||||
<< " Mit dieser Unterfunktion von " << programName << " können eigene" << std::endl
|
||||
<< " Redirect-Links umgewandelt werden. Beispiel:" << std::endl
|
||||
<< " https://s.to/redirect/44498xy -> https://vivolvox.xy/123xy" << std::endl
|
||||
<< " Der Link kann folgen Aussehen: {[*]s.to}/redirect/[*]." << std::endl
|
||||
<< " https://serienstream.sx/redirect/44498xy -> https://vivolvox.xy/123xy" << std::endl
|
||||
<< " Der Link kann folgen Aussehen: {[*]serienstream.sx}/redirect/[*]." << std::endl
|
||||
<< " Standartwerte können im Defaultfile geändert werden." << std::endl << std::endl;
|
||||
|
||||
std::cout << "OPTIONEN:" << std::endl
|
||||
@ -861,10 +861,10 @@ void unterOption_search_help(std::string programName)
|
||||
<< " " << programName << " search [OPTION]... [{-u, --update}&|/{-l, --last-update}] [Name]" << std::endl << std::endl;
|
||||
|
||||
std::cout << "Beschreibung:" << std::endl
|
||||
<< " Mit dieser Unterfunktion des Programms kann man Serien auf s.to suchen." << std::endl
|
||||
<< " Mit dieser Unterfunktion des Programms kann man Serien auf serienstream.sx suchen." << std::endl
|
||||
<< " Tipp: Falls deine Serie nicht gefunden wird, entferne einen Teil" << std::endl
|
||||
<< " am Ende deines SuchNamens und wiederhole die Suche." << std::endl
|
||||
<< " Tipp: Wenn deine Serie sehr neu auf s.to ist, und deshalb nicht gefunden" << std::endl
|
||||
<< " Tipp: Wenn deine Serie sehr neu auf serienstream.sx ist, und deshalb nicht gefunden" << std::endl
|
||||
<< " wird, verwende die Option -u, um die Liste zu aktualisieren." << std::endl << std::endl;
|
||||
|
||||
std::cout << "AKTUALISIERUNG:" << std::endl
|
||||
@ -1235,7 +1235,7 @@ void unterOption_news_help(std::string programName)
|
||||
std::cout << "Aufruf: " << programName << " news [OPTION]..." << std::endl << std::endl;
|
||||
|
||||
std::cout << "Beschreibung:" << std::endl
|
||||
<< " Mit dieser Unterfunktion kann man die neuesten 75 Folgen auf s.to sehen." << std::endl << std::endl;
|
||||
<< " Mit dieser Unterfunktion kann man die neuesten 75 Folgen auf serienstream.sx sehen." << std::endl << std::endl;
|
||||
|
||||
std::cout << "OPTIONEN:" << std::endl
|
||||
<< " -p [ip:port/ip/port], --socks5-proxy [ip:port/ip/port]" << std::endl
|
||||
|
@ -91,7 +91,7 @@ struct Settings {
|
||||
proxy_ip = "127.0.0.1",
|
||||
languages = "GerDub,GerSub,Eng,",
|
||||
genaueHoster = "",
|
||||
version = "4.0.4",
|
||||
version = "4.1.0",
|
||||
defaultFileVersion="1.8",
|
||||
default_checkPath = "",
|
||||
default_Searchmuster = "S%Staffel%E%Folge%";
|
||||
|
@ -65,7 +65,7 @@ void * threadFunction(void * data) {
|
||||
std::string Link = myThreadData->pageManager->chooseHosterLink(allLinks, myThreadData->settings->genaueHoster, myThreadData->settings->languages, myThreadData->settings->debugMode);
|
||||
|
||||
if(myThreadData->settings->debugMode)
|
||||
std::cout << " > Thread " << myThreadData->id << allLinks << std::endl << ( (Link == "") ? "" : " -> Link: 'https://s.to") << Link << ( (Link == "") ? "" : "'\n" );
|
||||
std::cout << " > Thread " << myThreadData->id << allLinks << std::endl << ( (Link == "") ? "" : " -> Link: 'https://serienstream.sx") << Link << ( (Link == "") ? "" : "'\n" );
|
||||
|
||||
|
||||
|
||||
@ -111,14 +111,14 @@ void * threadFunction(void * data) {
|
||||
}
|
||||
|
||||
for (int i = 1; i <= 3; ++i) {
|
||||
std::string newUrl = myThreadData->pageManager->getUrlAfterRedirect("https://s.to" + Link);
|
||||
std::string newUrl = myThreadData->pageManager->getUrlAfterRedirect("https://serienstream.sx" + Link);
|
||||
if (newUrl == "-1") {
|
||||
if(myThreadData->settings->debugMode)
|
||||
std::cerr << " => Debug: In Thread: "<< myThreadData->id << ": getUrlAfterRedirect Function failed: returned -1." << std::endl;
|
||||
return myThreadData->setState(16);
|
||||
|
||||
// Get redirect link after getUrlAfterRedirect function
|
||||
} else if(newUrl.find("/s.to/redirect/") != std::string::npos ) {
|
||||
} else if(newUrl.find("/serienstream.sx/redirect/") != std::string::npos ) {
|
||||
if(myThreadData->settings->debugMode)
|
||||
std::cout << " > Thread " << myThreadData->id << "Warnung: Redirect Link nach umwandlung (Capcha?) --> Neuer Account" << std::endl;
|
||||
if(myThreadData->pageManager->login(myThreadData->accountManager->getNextAccount()) != 0) {
|
||||
@ -151,7 +151,7 @@ void * threadFunction(void * data) {
|
||||
}
|
||||
|
||||
//error at 3 time
|
||||
myThreadData->returnValue = " => " + replace(folgenID, "E", " E") + ( (folgenID == "") ? "" : ": " ) + red + "https://s.to" + Link + clearColor;
|
||||
myThreadData->returnValue = " => " + replace(folgenID, "E", " E") + ( (folgenID == "") ? "" : ": " ) + red + "https://serienstream.sx" + Link + clearColor;
|
||||
if(myThreadData->settings->outputFilePaths.size() != 0)
|
||||
if(myThreadData->pageManager->writeToFile(myThreadData->settings->outputFilePaths, replace(folgenID, "E", " E") + ( (folgenID == "") ? "" : ": " ) + Link) != 0) {
|
||||
if(myThreadData->settings->debugMode)
|
||||
@ -398,7 +398,7 @@ int ProgramManager::defaultModus(Settings *settings)
|
||||
|
||||
/* Wenn multihtreading seaktiviert ist, normal login sonst bereite threads vor
|
||||
if(settings->maxThreads == 0) {
|
||||
// melde bei s.to an und speicher cookies.
|
||||
// melde bei serienstream.sx an und speicher cookies.
|
||||
if (pageManager.login(accountManager.getNextAccount()) != 0) //----------------------------------------
|
||||
return 29;
|
||||
}*/
|
||||
@ -574,7 +574,7 @@ int ProgramManager::defaultModus(Settings *settings)
|
||||
std::string Link = pageManager.chooseHosterLink(allLinks, settings->genaueHoster, settings->languages, settings->debugMode);
|
||||
|
||||
if(settings->debugMode)
|
||||
std::cout << allLinks << std::endl << ( (Link == "") ? "" : " -> Link: 'https://s.to") << Link << ( (Link == "") ? "" : "'\n" );
|
||||
std::cout << allLinks << std::endl << ( (Link == "") ? "" : " -> Link: 'https://serienstream.sx") << Link << ( (Link == "") ? "" : "'\n" );
|
||||
if(convertLink(Link, &accountManager, settings, staffel, folge, allLinks) != 0) {
|
||||
if(settings->debugMode)
|
||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": convert Link failed." << std::endl;
|
||||
@ -622,7 +622,7 @@ int ProgramManager::directLinkModus(Settings *settings)
|
||||
std::cout << " => Error: Invalid Redirect Link: '" << line << "'" << std::endl;
|
||||
continue;
|
||||
|
||||
} else if(convertLink(line.erase(0, ((line.find("s.to") == std::string::npos) ? 0 : line.find("s.to") + 4 )), &accountManager, settings) != 0) {
|
||||
} else if(convertLink(line.erase(0, ((line.find("serienstream.sx") == std::string::npos) ? 0 : line.find("serienstream.sx") + 4 )), &accountManager, settings) != 0) {
|
||||
if(settings->debugMode)
|
||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": convert Link failed." << std::endl;
|
||||
return 78;
|
||||
@ -1030,7 +1030,7 @@ int ProgramManager::infoModus(Settings *settings)
|
||||
int ProgramManager::newsModus(Settings *settings)
|
||||
{
|
||||
size_t pos = 0;
|
||||
std::string html = pageManager.getServerRequest("https://s.to/neue-episoden").html;
|
||||
std::string html = pageManager.getServerRequest("https://serienstream.sx/neue-episoden").html;
|
||||
if(html == "-1") {
|
||||
if(settings->debugMode)
|
||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": getServerRequest function failed." << std::endl;
|
||||
@ -1280,7 +1280,7 @@ int ProgramManager::cleanUpSettingsAndCache(Settings *settings)
|
||||
|
||||
int ProgramManager::searchModus_update(Settings *settings)
|
||||
{
|
||||
Reply reply = pageManager.getServerRequest("https://s.to/serien-alphabet");
|
||||
Reply reply = pageManager.getServerRequest("https://serienstream.sx/serien-alphabet");
|
||||
if(reply.html == "-1") {
|
||||
if(settings->debugMode)
|
||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": getServerRequest function failed." << std::endl;
|
||||
@ -1512,7 +1512,7 @@ int ProgramManager::convertLink(std::string redirectLink, AccountManager * accou
|
||||
}
|
||||
|
||||
for (int i = 1; i <= 3; ++i) {
|
||||
std::string newUrl = pageManager.getUrlAfterRedirect("https://s.to" + redirectLink);
|
||||
std::string newUrl = pageManager.getUrlAfterRedirect("https://serienstream.sx" + redirectLink);
|
||||
//wenn function fehl schlug beende das Programm
|
||||
if (newUrl == "-1") {
|
||||
if(settings->debugMode)
|
||||
@ -1520,7 +1520,7 @@ int ProgramManager::convertLink(std::string redirectLink, AccountManager * accou
|
||||
return 102;
|
||||
|
||||
// wenn nach der Umwandlung immern och ein redirect vorhanden ist, also wenn z.B.: account gewechselt werden muss
|
||||
} else if(newUrl.find("/s.to/redirect/") != std::string::npos ) {
|
||||
} else if(newUrl.find("/serienstream.sx/redirect/") != std::string::npos ) {
|
||||
if(settings->debugMode)
|
||||
std::cout << "Warnung: Redirect Link nach umwandlung (Capcha?) --> Neuer Account" << std::endl;
|
||||
if(pageManager.login(accountManager->getNextAccount()) != 0) {
|
||||
@ -1530,12 +1530,12 @@ int ProgramManager::convertLink(std::string redirectLink, AccountManager * accou
|
||||
}
|
||||
continue;
|
||||
|
||||
//wenn nach der Umwandlung https://s.to/ vorhanden ist, die ist wenn der Link Ungültig war:
|
||||
} else if (newUrl == "https://s.to/") {
|
||||
std::cout << " => " << red << replace(folgenID, "E", " E") << ( (folgenID == "") ? "" : ": " ) << "Ungültige Url: 'https://s.to" << redirectLink << "'"
|
||||
//wenn nach der Umwandlung https://serienstream.sx/ vorhanden ist, die ist wenn der Link Ungültig war:
|
||||
} else if (newUrl == "https://serienstream.sx/") {
|
||||
std::cout << " => " << red << replace(folgenID, "E", " E") << ( (folgenID == "") ? "" : ": " ) << "Ungültige Url: 'https://serienstream.sx" << redirectLink << "'"
|
||||
<< ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
||||
if(settings->outputFilePaths.size() != 0)
|
||||
if(pageManager.writeToFile(settings->outputFilePaths, replace(folgenID, "E", " E") + ( (folgenID == "") ? "" : ": " ) + "Ungültige Url: https://s.to" + redirectLink) != 0) {
|
||||
if(pageManager.writeToFile(settings->outputFilePaths, replace(folgenID, "E", " E") + ( (folgenID == "") ? "" : ": " ) + "Ungültige Url: https://serienstream.sx" + redirectLink) != 0) {
|
||||
if(settings->debugMode)
|
||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": writeToFile f() failed." << std::endl;
|
||||
return 108;
|
||||
@ -1561,7 +1561,7 @@ int ProgramManager::convertLink(std::string redirectLink, AccountManager * accou
|
||||
}
|
||||
|
||||
//nach 3temn Versuch gib error aus:
|
||||
std::cout << " => " << replace(folgenID, "E", " E") << ( (folgenID == "") ? "" : ": " ) << red << "https://s.to" << redirectLink << ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
||||
std::cout << " => " << replace(folgenID, "E", " E") << ( (folgenID == "") ? "" : ": " ) << red << "https://serienstream.sx" << redirectLink << ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
||||
if(settings->outputFilePaths.size() != 0) {
|
||||
if(pageManager.writeToFile(settings->outputFilePaths, replace(folgenID, "E", " E") + ( (folgenID == "") ? "" : ": " ) + redirectLink) != 0) {
|
||||
if(settings->debugMode)
|
||||
|
Loading…
Reference in New Issue
Block a user