Skip to content

Commit

Permalink
fix parser breaking on Music type anime
Browse files Browse the repository at this point in the history
  • Loading branch information
irfan-dahir committed Aug 1, 2018
1 parent d4f26ea commit 0c9a90b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Lib/Parser/AnimeParse.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ function () {
'~<span class="dark_text">Type:</span>~',
function () {
preg_match('~<a href="(.*?)">(.*?)</a>~', $this->file[$this->lineNo + 1], $this->matches);

if (empty($this->matches)) {
$type = trim(str_replace("</div>", "", $this->file[$this->lineNo + 1]));
$this->model->set('Anime', 'type', $type);
return;
}

$this->model->set('Anime', 'type', $this->matches[2]);
}
);
Expand Down

0 comments on commit 0c9a90b

Please sign in to comment.