forked from markus/S_New4
fix info funktion
This commit is contained in:
parent
bb5571b20b
commit
ce3f2adbad
@ -1172,8 +1172,15 @@ int ProgramManager::infoModus(Settings *settings)
|
|||||||
|
|
||||||
int ProgramManager::newsModus(Settings *settings)
|
int ProgramManager::newsModus(Settings *settings)
|
||||||
{
|
{
|
||||||
|
if(settings->pages.size() < 1) {
|
||||||
|
std::cout << " => Error Keine Internet Seiten vorhanden." << std::endl;
|
||||||
|
return -12;
|
||||||
|
}
|
||||||
|
|
||||||
|
for( const auto &page : settings->pages ) {
|
||||||
|
std::cout << ((settings->colorless) ? "" : "\033[93m") << "Auf '" << page.url << "'..." << ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
||||||
|
|
||||||
size_t pos = 0;
|
size_t pos = 0;
|
||||||
PAGE page;
|
|
||||||
std::string html = pageManager.getServerRequest("https://" + page.url +"/neue-episoden").html;
|
std::string html = pageManager.getServerRequest("https://" + page.url +"/neue-episoden").html;
|
||||||
if(html == "-1") {
|
if(html == "-1") {
|
||||||
if(settings->debugMode)
|
if(settings->debugMode)
|
||||||
@ -1234,6 +1241,10 @@ int ProgramManager::newsModus(Settings *settings)
|
|||||||
<< ((settings->colorless) ? "" : "\033[92m") << id << ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
<< ((settings->colorless) ? "" : "\033[92m") << id << ((settings->colorless) ? "" : "\033[0m") << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user