diff --git a/parameterManager.h b/parameterManager.h index 03ec74b..7fae31c 100644 --- a/parameterManager.h +++ b/parameterManager.h @@ -63,7 +63,7 @@ struct Settings { proxy_ip = "127.0.0.1", languages = "GerDub,GerSub,Eng,", genaueHoster = "", - version = "3.6.0", + version = "3.6.1", defaultFileVersion="1.6", outputFilePath = "", default_checkPath = "", diff --git a/programManager.cpp b/programManager.cpp index 8324d4e..4438c53 100644 --- a/programManager.cpp +++ b/programManager.cpp @@ -1402,10 +1402,13 @@ int ProgramManager::convertLink(std::string redirectLink, AccountManager * accou for (int i = 1; i <= 3; ++i) { std::string newUrl = pageManager.getUrlAfterRedirect("https://s.to" + redirectLink); + //wenn function fehl schlug beende das Programm if (newUrl == "-1") { if(settings->debugMode) std::cerr << ">>> Debug In " << __FUNCTION__ << ": getUrlAfterRedirect f() failed." << std::endl; 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 ) { if(settings->debugMode) std::cout << "Warnung: Redirect Link nach umwandlung (Capcha?) --> Neuer Account" << std::endl; @@ -1416,6 +1419,17 @@ 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 << folgenID << ( (folgenID == "") ? "" : ": " ) << "Ungültige Url: 'https://s.to" << redirectLink << "'\033[0m" << std::endl; + if(settings->outputFilePath != "") + if(pageManager.writeToFile(settings->outputFilePath, folgenID + ( (folgenID == "") ? "" : ": " ) + "Ungültige Url: https://s.to" + redirectLink) != 0) { + if(settings->debugMode) + std::cerr << ">>> Debug In " << __FUNCTION__ << ": writeToFile f() failed." << std::endl; + return 108; + } + return 0; + //sonst war die umwandlung erfolgreich } else { std::cout << " => " << folgenID << ( (folgenID == "") ? "" : ": " ) << green << newUrl << "\033[0m" << std::endl; if(settings->outputFilePath != "") @@ -1427,6 +1441,8 @@ int ProgramManager::convertLink(std::string redirectLink, AccountManager * accou return 0; } } + + //nach 3temn Versuch gib error aus: std::cout << " => " << folgenID << ( (folgenID == "") ? "" : ": " ) << red << "https://s.to" << redirectLink << "\033[0m" << std::endl; if(settings->outputFilePath != "") { if(pageManager.writeToFile(settings->outputFilePath, folgenID + ( (folgenID == "") ? "" : ": " ) + redirectLink) != 0) {