public function seasons()
{
if ($this->seasoncount == -1) {
$this->getPage("Title");
if (preg_match_all('|href="/title/tt\\d{7}/episodes\\?season=\\d+.*?"\\s*>(\\d+)</a>|Ui', $this->page["Title"], $matches)) {
$this->seasoncount = $matches[1][0];
} else {
$this->seasoncount = 0;
}
if (preg_match_all('|href="/title/tt\\d{7}/episodes\\?season\\=unknown"\\s*>unknown</a>|Ui', $this->page["Title"], $matches)) {
$this->seasoncount += count($matches[0]);
}
}
return $this->seasoncount;
}