Updates for scraper errors, still erroring sometimes though.
This commit is contained in:
@@ -174,8 +174,8 @@ class FighterImporter {
|
||||
/* $cid = "ufc:" . $url; */
|
||||
$request = $this->httpClient->request('GET', $url, $headers);
|
||||
$content = $request->getBody()->getContents();
|
||||
$check = strpos($content, "No Result Found For");
|
||||
if (!$check) {
|
||||
$invalid_page = strpos($content, "No Result Found For");
|
||||
if (!$invalid_page) {
|
||||
\Drupal::logger('ufc')->notice("Extracting fighters from page $i.");
|
||||
self::extractFighters($content);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user