Skip to content

Commit

Permalink
Merge pull request #4 from thiagogomesverissimo/master
Browse files Browse the repository at this point in the history
Ignore warnings about bad html
  • Loading branch information
splattner authored Mar 27, 2020
2 parents 5d87702 + a9b0edb commit 9226225
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,16 @@ public function getMemberlist() {
foreach($urlsForLetters as $url) {
$response = $this->client->request('GET', $url);

$dom = new \DOMDocument;
$dom = new \DOMDocument('1.0', 'UTF-8');

// set error level
$internalErrors = libxml_use_internal_errors(true);

$dom->loadHTML($response->getBody());

// Restore error level
libxml_use_internal_errors($internalErrors);

$tables = $dom->getElementsByTagName("table")[4];
$trs = $tables->getElementsByTagName("tr");

Expand Down

0 comments on commit 9226225

Please sign in to comment.