forked from markus/S_New4
fix errors
This commit is contained in:
parent
b2f7ee4380
commit
0eb4e91d62
@ -119,7 +119,7 @@ void * threadFunction(void * data) {
|
||||
return myThreadData->setState(16);
|
||||
|
||||
// Get redirect link after getUrlAfterRedirect function
|
||||
} else if ( REPLy.html.find("404 - Seite nicht gefunden") != std::string::npos || REPLy.html.find("403 Forbidden") != std::string::npos) {
|
||||
} else if (newUrl == "https://s.to" || newUrl == "https://" + myThreadData->page.url || REPLy.html.find("404 - Seite nicht gefunden") != std::string::npos || REPLy.html.find("403 Forbidden") != std::string::npos) {
|
||||
if(myThreadData->settings->debugMode)
|
||||
std::cerr << " => Debug: In Thread: "<< myThreadData->id << ": getUrlAfterRedirect Function failed: 404 - Seite nicht gefunden oder 403 Forbidden." << std::endl;
|
||||
return myThreadData->setState(404);
|
||||
@ -1280,7 +1280,11 @@ int ProgramManager::newsModus(Settings *settings)
|
||||
}
|
||||
|
||||
|
||||
std::cout << std::endl;
|
||||
if(settings->useFirstPage)
|
||||
break;
|
||||
else
|
||||
std::cout << std::endl;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1795,6 +1799,8 @@ int ProgramManager::convertLink(PAGE page, std::string redirectLink, AccountMana
|
||||
for (int i = 1; i <= 3; ++i) {
|
||||
auto rEply = pageManager.getUrlAfterRedirect("https://" + page.url + redirectLink, settings->cookieFilePath + "_" + page.name_id);
|
||||
std::string newUrl = rEply.url;
|
||||
std::cout << "URL NACH UMWANDLUNG:" << newUrl << "\n\n" << rEply.html << std::endl;
|
||||
|
||||
|
||||
//wenn function fehl schlug beende das Programm
|
||||
if (newUrl == "-1") {
|
||||
@ -1802,8 +1808,8 @@ int ProgramManager::convertLink(PAGE page, std::string redirectLink, AccountMana
|
||||
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 == "https://" + page.url + "/" || rEply.html.find("404 - Seite nicht gefunden") != std::string::npos || rEply.html.find("403 Forbidden") != std::string::npos) {
|
||||
//wenn nach der Umwandlung https://seriens tream.sx/ vorhanden ist, die ist wenn der Link Ungültig war:
|
||||
} else if (newUrl == "https://s.to" || newUrl == "https://" + page.url || rEply.html.find("404 - Seite nicht gefunden") != std::string::npos || rEply.html.find("403 Forbidden") != std::string::npos) {
|
||||
std::cout << " => " << red << replace(folgenID, "E", " E") << ( (folgenID == "") ? "" : ": " ) << "Ungültige Url: 'https://" + page.url << redirectLink << "'"
|
||||
<< ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
||||
if(settings->outputFilePaths.size() != 0)
|
||||
@ -1813,7 +1819,7 @@ int ProgramManager::convertLink(PAGE page, std::string redirectLink, AccountMana
|
||||
return 108;
|
||||
}
|
||||
return 0;
|
||||
//sonst war die umwandlung erfolgreich
|
||||
// wenn nach der Umwandlung immern och ein redirect vorhanden ist, also wenn z.B.: account gewechselt werden muss
|
||||
} else if(newUrl.find("/" + page.url + "/redirect/") != std::string::npos ) {
|
||||
if(settings->debugMode)
|
||||
std::cout << "Warnung: Redirect Link nach umwandlung (Capcha?) --> Neuer Account" << std::endl;
|
||||
@ -1823,8 +1829,7 @@ int ProgramManager::convertLink(PAGE page, std::string redirectLink, AccountMana
|
||||
return -1;
|
||||
}
|
||||
continue;
|
||||
|
||||
//wenn nach der Umwandlung https://seriens tream.sx/ vorhanden ist, die ist wenn der Link Ungültig war:
|
||||
//alles ok
|
||||
} else {
|
||||
if( (newUrl = pageManager.getLinkAfterHosterBasedOperation(newUrl)) == "") {
|
||||
if(settings->debugMode)
|
||||
|
Loading…
Reference in New Issue
Block a user