public function saveHtml($filename, $base = null)
    {
        $this->ensureWritableDirectory(dirname($filename));

        $html = new Html($this->getHtml());

        if (null !== $base) {
            $html->resolveLinks(\GuzzleHttp\Psr7\uri_for($base));
        }

        file_put_contents($filename, $html->get());

        return $this;
    }