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
|
//Entferne alles nach den Links
|
||||||
//pos = HTML.find("<script async=");
|
//pos = HTML.find("<script async=");
|
||||||
|
//pos = HTML.find("<script data-cfasync=\"");
|
||||||
|
if( (pos = HTML.find("<script async=")) == std::string::npos )
|
||||||
pos = HTML.find("<script data-cfasync=\"");
|
pos = HTML.find("<script data-cfasync=\"");
|
||||||
|
|
||||||
if(pos == std::string::npos) {
|
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 "";
|
return "";
|
||||||
}
|
}
|
||||||
HTML.erase(pos,HTML.length() - pos);
|
HTML.erase(pos,HTML.length() - pos);
|
||||||
|
@ -1339,7 +1339,7 @@ bool removeDirIsOk(std::string path, Settings *settings)
|
|||||||
std::getline(std::cin, input);
|
std::getline(std::cin, input);
|
||||||
if(input != "OK") {
|
if(input != "OK") {
|
||||||
std::cout << "Abbruch..." << std::endl;
|
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 UpdaterCloudUrlWithPath "https://cloud.obermui.de/s/tXz7SWdaPJ7TacZ/download?path=%2F&files="
|
||||||
#define SecondUpdaterCloudUrlWithPath "https://snew4.obermui.de/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");
|
perror(" => Error: Chmod failed");
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//Führe neue Version aus und überprüfe rückgabewert
|
//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) {
|
if( system((downloadedFilePath + " --version" ).c_str()) != 0) {
|
||||||
std::cerr << (" => Error: Ausführen der neuen Version ist fehlgeschlagen") << std::endl;
|
std::cerr << (" => Error: Ausführen der neuen Version ist fehlgeschlagen") << std::endl;
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//find exePath heraus
|
//find exePath heraus
|
||||||
std::string exePath = pageManager.getExePath();
|
std::string exePath = pageManager.getExePath();
|
||||||
if(exePath == "") {
|
if(exePath == "") {
|
||||||
@ -1279,7 +1283,7 @@ int ProgramManager::updateModus(Settings *settings)
|
|||||||
perror(" => ERROR: Umbennen auch fehlgeschlagen");
|
perror(" => ERROR: Umbennen auch fehlgeschlagen");
|
||||||
return 2314;
|
return 2314;
|
||||||
} else {
|
} 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
|
//Cache Dir
|
||||||
if (settings->name == "CACHE" || settings->name == "ALL") {
|
else if (settings->name == "CACHE" || settings->name == "ALL") {
|
||||||
if( ! removeDirIsOk(settings->cacheDir, settings)) {
|
if( ! removeDirIsOk(settings->cacheDir, settings)) {
|
||||||
std::cout << " => Error: Das löschen des Cache-Ordners ist fehlgeschlagen." << std::endl;
|
std::cout << " => Error: Das löschen des Cache-Ordners ist fehlgeschlagen." << std::endl;
|
||||||
return 2;
|
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 << " => Error: Unbekannte Option '" << settings->name << "' für Ordnerauswahl." << std::endl;
|
||||||
std::cout << "Aufruf: " << settings->programName << " --remove [OPTION]... [settings|cache|all]" << std::endl;
|
std::cout << "Aufruf: " << settings->programName << " --remove [OPTION]... [settings|cache|all]" << std::endl;
|
||||||
@ -1370,15 +1374,16 @@ int ProgramManager::searchModus_update(Settings *settings)
|
|||||||
|
|
||||||
std::string serienListe = replace( pageManager.grep( reply.html, "data-alternative-title" ), "</li>", "\n" );
|
std::string serienListe = replace( pageManager.grep( reply.html, "data-alternative-title" ), "</li>", "\n" );
|
||||||
|
|
||||||
if(reply.html.find("\" href=\"") == std::string::npos ||
|
std::string tests[] = {"\" href=\"", "<li><a data-alternative-title=\"", "/serie/stream/", "</a>", };
|
||||||
reply.html.find("<li><a data-alternative-title=\"") == std::string::npos ||
|
for ( auto t : tests ) {
|
||||||
reply.html.find("/serie/stream/") == std::string::npos ||
|
if(reply.html.find( t ) == std::string::npos) {
|
||||||
reply.html.find("</a>") == std::string::npos) {
|
|
||||||
if(settings->debugMode)
|
if(settings->debugMode)
|
||||||
std::cerr << ">>> Debug In " << __FUNCTION__
|
std::cerr << ">>> Debug In " << __FUNCTION__ << ": hatml doesnt contain:'" << t << "' after preparing." << std::endl;
|
||||||
<< ": hatml doesnt contain:' \" href=\" or <li><a data-alternative-title=\" or /serie/stream/ or </a> ' after preparing." << std::endl;
|
|
||||||
return 51;
|
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...
|
//...\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=\"", "");
|
serienListe = replace(serienListe, "<li><a data-alternative-title=\"", "");
|
||||||
|
Loading…
Reference in New Issue
Block a user