[DownDetectorBridge] Fix bridge (#1528)
This commit is contained in:
parent
f48909b84e
commit
63a4db7e86
1 changed files with 10 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue