@@ -19,11 +19,7 @@ class OGPResolver implements Resolver, Parser
|
||||
public function resolve(string $url): Metadata
|
||||
{
|
||||
$res = $this->client->get($url);
|
||||
if ($res->getStatusCode() === 200) {
|
||||
return $this->parse($res->getBody());
|
||||
} else {
|
||||
throw new \RuntimeException("{$res->getStatusCode()}: $url");
|
||||
}
|
||||
return $this->parse($res->getBody());
|
||||
}
|
||||
|
||||
public function parse(string $html): Metadata
|
||||
|
Reference in New Issue
Block a user