v3.6.1: extra ausgabe für ungültige link vorallem beu snew4 url

This commit is contained in:
Markus 2019-11-01 20:06:56 +01:00
parent 812df40b98
commit 61995f0587
2 changed files with 17 additions and 1 deletions

View File

@ -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 = "",

View File

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