fixed faulty article skipping (bug introduced in 0.4.0)

This commit is contained in:
tastytea 2018-03-15 13:54:53 +01:00
parent b4963b719f
commit 37a2f2bc90
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (mastorss
VERSION 0.4.0
VERSION 0.4.1
LANGUAGES CXX
)

View File

@ -122,6 +122,7 @@ std::vector<string> parse_website(const string &xml)
string desc = v.second.get_child("description").data();
string str = title + "\n\n" + desc;
bool skipthis = false;
try
{
// Skip entries beginning with this text
@ -132,7 +133,8 @@ std::vector<string> parse_website(const string &xml)
{
if (title.compare(0, skip.length(), skip) == 0)
{
continue;
skipthis = true;
break;
}
}
}
@ -141,6 +143,10 @@ std::vector<string> parse_website(const string &xml)
{
// Node not found, no problem
}
if (skipthis)
{
continue;
}
unescape_html(str);