英語版Pixivに対応する

This commit is contained in:
eai04191
2019-12-10 13:12:37 +09:00
parent 3420e053fc
commit 010a0a9c8f
3 changed files with 19 additions and 3 deletions

View File

@@ -45,8 +45,8 @@ class PixivResolver implements Resolver
}
$page = 0;
if (preg_match('~www\.pixiv\.net/artworks/(\d+)~', $url, $matches)) {
$illustId = $matches[1];
if (preg_match('~www\.pixiv\.net/(en/)?artworks/(?P<illustId>\d+)~', $url, $matches)) {
$illustId = $matches['illustId'];
} else {
parse_str(parse_url($url, PHP_URL_QUERY), $params);
$illustId = $params['illust_id'];