成否判定を除去
This commit is contained in:
parent
579708389a
commit
d1abca5416
@ -22,12 +22,6 @@ class Kb10uyShortStoryServerResolver implements Resolver
|
|||||||
public function resolve(string $url): Metadata
|
public function resolve(string $url): Metadata
|
||||||
{
|
{
|
||||||
$res = $this->client->get($url);
|
$res = $this->client->get($url);
|
||||||
if ($res->getStatusCode() !== 200) {
|
|
||||||
throw new \RuntimeException("{$res->getStatusCode()}: $url");
|
|
||||||
|
|
||||||
return $this->parse($res->getBody());
|
|
||||||
}
|
|
||||||
|
|
||||||
$html = (string) $res->getBody();
|
$html = (string) $res->getBody();
|
||||||
$crawler = new Crawler($html);
|
$crawler = new Crawler($html);
|
||||||
$infoElement = $crawler->filter('div.post-info');
|
$infoElement = $crawler->filter('div.post-info');
|
||||||
|
Loading…
Reference in New Issue
Block a user