Skip to content

Commit

Permalink
Switch to Torann::DomParser
Browse files Browse the repository at this point in the history
  • Loading branch information
jamezpolley committed May 16, 2019
1 parent 458f141 commit 6147b13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.php
Expand Up @@ -3,7 +3,7 @@
require_once 'vendor/openaustralia/scraperwiki/scraperwiki.php';

use PGuardiario\PGBrowser;
use Sunra\PhpSimple\HtmlDomParser;
use Torann\DomParser\HtmlDom;

date_default_timezone_set('Australia/Hobart');

Expand All @@ -13,7 +13,7 @@
$browser = new PGBrowser();
$page = $browser->get($url_base);

$dom = HtmlDomParser::str_get_html($page->html);
$dom = HtmlDom::fromString($page->html);

foreach ( $dom->find("table.table",0)->children(1)->find('tr') as $tr ) {
$council_reference = strrev(explode("/", strrev($tr->find("a",0)->href))[0]); # get the file name
Expand Down

0 comments on commit 6147b13

Please sign in to comment.