Skip to content

Commit

Permalink
[DownDetectorBridge] Fix bridge (#1528)
Browse files Browse the repository at this point in the history
  • Loading branch information
VerifiedJoseph authored May 17, 2020
1 parent f48909b commit 63a4db7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions bridges/DownDetectorBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -6125,9 +6125,16 @@ public function collectData(){
$table = $html->find('table.table-striped', 0);

$maxCount = 10;
foreach ($table->find('tr') as $downEvent) {
$downLink = $downEvent->find('td', 1)->find('a', 1);
$item = $this->collectArticleData($downLink->getAttribute('href'));
foreach ($table->find('tr') as $event) {
$td = $event->find('td', 0);

if (is_null($td)) {
continue;
}

$link = $event->find('td', 0)->find('a', 0);

$item = $this->collectArticleData($link->getAttribute('href'));
$this->items[] = $item;
if($maxCount == 0) break;
$maxCount -= 1;
Expand Down

0 comments on commit 63a4db7

Please sign in to comment.