[DownDetectorBridge] Fix bridge (#1528)

This commit is contained in:
Joseph 2020-05-17 18:04:37 +00:00 committed by GitHub
parent f48909b84e
commit 63a4db7e86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6125,9 +6125,16 @@ class DownDetectorBridge extends BridgeAbstract {
$table = $html->find('table.table-striped', 0); $table = $html->find('table.table-striped', 0);
$maxCount = 10; $maxCount = 10;
foreach ($table->find('tr') as $downEvent) { foreach ($table->find('tr') as $event) {
$downLink = $downEvent->find('td', 1)->find('a', 1); $td = $event->find('td', 0);
$item = $this->collectArticleData($downLink->getAttribute('href'));
if (is_null($td)) {
continue;
}
$link = $event->find('td', 0)->find('a', 0);
$item = $this->collectArticleData($link->getAttribute('href'));
$this->items[] = $item; $this->items[] = $item;
if($maxCount == 0) break; if($maxCount == 0) break;
$maxCount -= 1; $maxCount -= 1;