This commit is contained in:
evazion
2022-03-18 16:59:12 -05:00
parent 26d23c49d0
commit cc54b5f730
2 changed files with 3 additions and 2 deletions

View File

@@ -42,7 +42,8 @@ class Source::URL::Fanbox < Source::URL
# https://www.pixiv.net/fanbox/creator/1566167
# http://www.pixiv.net/fanbox/user/3410642
in "www.pixiv.net", "fanbox", ("creator" | "user"), user_id
# https://www.pixiv.net/fanbox/creator/18915237/post
in "www.pixiv.net", "fanbox", ("creator" | "user"), user_id, *rest
@user_id = user_id
# http://www.pixiv.net/fanbox/member.php?user_id=3410642

View File

@@ -116,7 +116,7 @@ class ArtistURLTest < ActiveSupport::TestCase
end
should "normalize pixiv fanbox account urls" do
url = create(:artist_url, url: "http://www.pixiv.net/fanbox/creator/3113804")
url = create(:artist_url, url: "http://www.pixiv.net/fanbox/creator/3113804/post")
assert_equal("https://www.pixiv.net/fanbox/creator/3113804", url.url)
assert_equal("http://www.pixiv.net/fanbox/creator/3113804/", url.normalized_url)