refactoring

This commit is contained in:
Egor Aristov 2025-03-23 09:35:08 +03:00
parent 91475c2c4d
commit 31bbc97f9b
Signed by: egor3f
GPG Key ID: 40482A264AAEC85F
2 changed files with 3 additions and 3 deletions

View File

@ -64,6 +64,9 @@ func (p *pageParser) parse() (*models.TaskResult, error) {
}
result.Items = append(result.Items, item)
}
if len(result.Items) == 0 {
return nil, fmt.Errorf("extract failed for all posts")
}
return &result, nil
}

View File

@ -287,9 +287,6 @@ func (e *PwExtractor) Extract(task models.Task) (result *models.TaskResult, errR
if err != nil {
return fmt.Errorf("parse page: %w", err)
}
if len(result.Items) == 0 {
return fmt.Errorf("extract failed for all posts")
}
return nil
})
return