forked from markus/S_New4
fixes
This commit is contained in:
parent
08a4b054e1
commit
ea246e18d0
@ -1040,17 +1040,21 @@ int ProgramManager::searchModus(Settings *settings, std::string *saveTo, bool no
|
||||
size_t ind_3 = line.find("|", ind_2 + 1);
|
||||
if(ind_3 == std::string::npos)
|
||||
continue;
|
||||
if(allUrlsInUSe.find( line.substr(ind_3 + 1) ) == std::string::npos) {
|
||||
on_other_sites = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string name_correct_upper = pageManager.upper_string( line.substr(ind_2 + 1, ind_3 - ind_2 - 1));
|
||||
|
||||
// Mindestens erlaubte Entfernung: 2, wenn name länger als 12: length / 5, ab l=20: max 5;
|
||||
if(levenshtein_distance(name_correct_upper, upper_name) <= std::min( std::max( (int)(name_correct_upper.length() / 5), 2),
|
||||
5))
|
||||
6))
|
||||
{
|
||||
if(allUrlsInUSe.find( line.substr(ind_3 + 1) ) == std::string::npos) {
|
||||
on_other_sites = true;
|
||||
continue;
|
||||
} else {
|
||||
finds += line + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(finds.size() >= 1)
|
||||
finds.pop_back();
|
||||
if(finds == "" && on_other_sites) {
|
||||
|
Loading…
Reference in New Issue
Block a user