成否判定を除去

This commit is contained in:
Yuu Kobayashi 2019-09-29 18:03:34 +09:00
parent 579708389a
commit d1abca5416
No known key found for this signature in database
GPG Key ID: 7B68F1DE6D34D796
1 changed files with 0 additions and 6 deletions

View File

@ -22,12 +22,6 @@ class Kb10uyShortStoryServerResolver implements Resolver
public function resolve(string $url): Metadata
{
$res = $this->client->get($url);
if ($res->getStatusCode() !== 200) {
throw new \RuntimeException("{$res->getStatusCode()}: $url");
return $this->parse($res->getBody());
}
$html = (string) $res->getBody();
$crawler = new Crawler($html);
$infoElement = $crawler->filter('div.post-info');