Return error if fulltext is empty.
This commit is contained in:
parent
3c8f9d8c7f
commit
6036e6c35d
|
@ -50,6 +50,11 @@ int main(const int argc, const char *argv[])
|
|||
{
|
||||
URI uri(opts.uri);
|
||||
html_extract page = uri.get();
|
||||
if (page.fulltext.empty())
|
||||
{
|
||||
cerr << "Error: Could not fetch page.";
|
||||
return 4;
|
||||
}
|
||||
db.store({opts.uri, uri.archive(), system_clock::now(), opts.tags,
|
||||
page.title, page.description, page.fulltext});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue