add check for full html file

This commit is contained in:
Markus 2019-08-11 19:20:32 +02:00
parent 69d7c41df6
commit 03844836fb

View File

@ -238,6 +238,10 @@ int ProgramManager::searchModus_update(Settings *settings)
Reply reply = pageManager.getServerRequest("https://s.to/serien");
if(reply.html == "-1")
return 21;
else if(reply.html.find("</html>") == std::string::npos ) {
std::cout << " => Error: Konnte </html> in searchModus_update() nicht finden." << std::endl;
return 22;
}

std::string serienListe = pageManager.replace( pageManager.grep( reply.html, "data-alternative-title" ), "</li>", "\n" );