forked from markus/S_New4
v4.3.7: fix http content chanche
This commit is contained in:
parent
fba3a8f448
commit
b46a966cda
@ -322,9 +322,12 @@ std::string PageManager::getLinks(std::string HTML)
|
||||
|
||||
//Entferne alles nach den Links
|
||||
//pos = HTML.find("<script async=");
|
||||
pos = HTML.find("<script data-cfasync=\"");
|
||||
//pos = HTML.find("<script data-cfasync=\"");
|
||||
if( (pos = HTML.find("<script async=")) == std::string::npos )
|
||||
pos = HTML.find("<script data-cfasync=\"");
|
||||
|
||||
if(pos == std::string::npos) {
|
||||
std::cout << " => Error: Konnte Position von \"" << "<script async=" << "\" nicht finden" <<std::endl;
|
||||
std::cout << " => Error: Konnte Position von \"" << "<script async=" << "\" nicht finden.(Punkt nach RedLinks)" <<std::endl;
|
||||
return "";
|
||||
}
|
||||
HTML.erase(pos,HTML.length() - pos);
|
||||
|
@ -1339,7 +1339,7 @@ bool removeDirIsOk(std::string path, Settings *settings)
|
||||
std::getline(std::cin, input);
|
||||
if(input != "OK") {
|
||||
std::cout << "Abbruch..." << std::endl;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#define UpdaterCloudUrlWithPath "https://cloud.obermui.de/s/tXz7SWdaPJ7TacZ/download?path=%2F&files="
|
||||
#define SecondUpdaterCloudUrlWithPath "https://snew4.obermui.de/download?path=%2F&files="
|
||||
#define VERSION "4.3.6"
|
||||
#define VERSION "4.3.7"
|
||||
|
||||
|
||||
|
||||
|
@ -1212,16 +1212,20 @@ int ProgramManager::updateModus(Settings *settings)
|
||||
perror(" => Error: Chmod failed");
|
||||
return 4;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Führe neue Version aus und überprüfe rückgabewert
|
||||
std::cout << " => INFO: Überprüfe die Funktionalität der neuen Version...\n" << std::endl;
|
||||
std::cout << " => INFO: Überprüfe die Funktionalität der neuen Version(" << downloadedFilePath << ")...\n" << std::endl;
|
||||
|
||||
if( system((downloadedFilePath + " --version" ).c_str()) != 0) {
|
||||
std::cerr << (" => Error: Ausführen der neuen Version ist fehlgeschlagen") << std::endl;
|
||||
return 5;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//find exePath heraus
|
||||
std::string exePath = pageManager.getExePath();
|
||||
if(exePath == "") {
|
||||
@ -1254,7 +1258,7 @@ int ProgramManager::updateModus(Settings *settings)
|
||||
if( fileExists(exePath) && fileExists(oldVersionPah) ) {
|
||||
std::cout << ((settings->colorless) ? ("\n") : "\n\033[33m")
|
||||
<< "!! => WARNUNG: --->Die Aktuelle Version konnte nicht verschoben, sondern nur kopiert werden! ( Z.: Operation Laufwerksübergreifend ? )\n"
|
||||
<< " ==> Aktuelle Version umbenennen. (Die Datei kann danach gelöscht werden!) " << ((settings->colorless) ? ("") : "\033[0m") << std::endl;
|
||||
<< " ==> Aktuelle Version umbenennen. (Die Datei kann danach gelöscht werden!) " << ((settings->colorless) ? ("") : "\033[0m") << std::endl;
|
||||
if(fileExists(exePath + "_ALT")) {
|
||||
std::cout << ((settings->colorless) ? ("") : "\033[33m") << " => WARNUNG: Es existiert bereits eine Datei mit dem Namen "
|
||||
<< exePath + "_ALT" << ((settings->colorless) ? ("") : "\033[0m") << "\n" << "Diese Datei loeschen: (Nur Enter um fortzufahren): " << std::flush;
|
||||
@ -1279,7 +1283,7 @@ int ProgramManager::updateModus(Settings *settings)
|
||||
perror(" => ERROR: Umbennen auch fehlgeschlagen");
|
||||
return 2314;
|
||||
} else {
|
||||
std::cout << " -> Umbenennen erfolgreich => Fahre fort..." << std::endl;
|
||||
std::cout << " -> Umbenennen erfolgreich. Fahre fort..." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1335,14 +1339,14 @@ int ProgramManager::cleanUpSettingsAndCache(Settings *settings)
|
||||
}
|
||||
|
||||
//Cache Dir
|
||||
if (settings->name == "CACHE" || settings->name == "ALL") {
|
||||
else if (settings->name == "CACHE" || settings->name == "ALL") {
|
||||
if( ! removeDirIsOk(settings->cacheDir, settings)) {
|
||||
std::cout << " => Error: Das löschen des Cache-Ordners ist fehlgeschlagen." << std::endl;
|
||||
return 2;
|
||||
}
|
||||
|
||||
}
|
||||
if(settings->name != "CACHE" && settings->name != "SETTINGS" && settings->name != "ALL")
|
||||
else if(settings->name != "CACHE" && settings->name != "SETTINGS" && settings->name != "ALL")
|
||||
{
|
||||
std::cout << " => Error: Unbekannte Option '" << settings->name << "' für Ordnerauswahl." << std::endl;
|
||||
std::cout << "Aufruf: " << settings->programName << " --remove [OPTION]... [settings|cache|all]" << std::endl;
|
||||
@ -1370,16 +1374,17 @@ int ProgramManager::searchModus_update(Settings *settings)
|
||||
|
||||
std::string serienListe = replace( pageManager.grep( reply.html, "data-alternative-title" ), "</li>", "\n" );
|
||||
|
||||
if(reply.html.find("\" href=\"") == std::string::npos ||
|
||||
reply.html.find("<li><a data-alternative-title=\"") == std::string::npos ||
|
||||
reply.html.find("/serie/stream/") == std::string::npos ||
|
||||
reply.html.find("</a>") == std::string::npos) {
|
||||
if(settings->debugMode)
|
||||
std::cerr << ">>> Debug In " << __FUNCTION__
|
||||
<< ": hatml doesnt contain:' \" href=\" or <li><a data-alternative-title=\" or /serie/stream/ or </a> ' after preparing." << std::endl;
|
||||
return 51;
|
||||
std::string tests[] = {"\" href=\"", "<li><a data-alternative-title=\"", "/serie/stream/", "</a>", };
|
||||
for ( auto t : tests ) {
|
||||
if(reply.html.find( t ) == std::string::npos) {
|
||||
if(settings->debugMode)
|
||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": hatml doesnt contain:'" << t << "' after preparing." << std::endl;
|
||||
return 51;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//...\n<li><a data-alternative-title="" href="/serie/stream/2012-das-jahr-null" title="2012 - Das Jahr Null Stream anschauen">2012 - Das Jahr Null</a>\n...
|
||||
serienListe = replace(serienListe, "<li><a data-alternative-title=\"", "");
|
||||
//...\n" href="/serie/stream/2012-das-jahr-null" title="2012 - Das Jahr Null Stream anschauen">2012 - Das Jahr Null</a>\n...
|
||||
|
Loading…
Reference in New Issue
Block a user