fix error with http links at -u ( not https ) & /redirect/* is now ok too

This commit is contained in:
Markus 2019-09-30 18:23:34 +02:00
parent 55d9480035
commit d5567228ee

View File

@ -359,11 +359,11 @@ int ProgramManager::directLinkModus(Settings *settings)
// return 71; // return 71;


while (getline(iStrStream, line).good()) { while (getline(iStrStream, line).good()) {
if(line.find("https://s.to/redirect/") == std::string::npos) { if(line.find("/redirect/") == std::string::npos) {
std::cout << " => Error: Invalid Redirect Link: '" << line << "'" << std::endl; std::cout << " => Error: Invalid Redirect Link: '" << line << "'" << std::endl;
continue; continue;
}
else if(convertLink(pageManager.replace(line, "https://s.to", ""), &accountManager, settings) != 0) } else if(convertLink(line.erase(0, ((line.find("s.to") == std::string::npos) ? 0 : line.find("s.to") + 4 )), &accountManager, settings) != 0)
return 78; return 78;
} }