英語版Pixivに対応する

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

No files matched your search

+2 -2
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'];