Closed
Description
I will change behavior about extracting target is not found.
No longer throw exception.
Because, target is not found is expectable - like db query behavior.
Migration Notes & WARNING
- this change can't detect that 'false' is supplied by "extracting target is not found" or filters into it.
- You should check scraping results has not false.
try {
$scraper->process('//bad_target', 'key', 'html')
->scrape($url);
} catch (Exception $e) {}
↓
$result = $scraper->process('//bad_target', 'key', 'html')
->scrape($url);
if (!isset($result['key'])) {
var_dump('error!');
}
ToDo
- notes to README
- storing or logging each not found target (NEXT MAJOR VERSION)
Metadata
Metadata
Assignees
Labels
No labels