sources: factor out Source::URL::PixivSketch.

Add upload support for Pixiv Sketch. Fetch tags, commentary, and artist,
and rewrite sample images to full images.

Authentication isn't required. R18 images are hidden in the browser but
visible in the API.
This commit is contained in:
evazion
2022-03-08 18:09:22 -06:00
parent 37441d6b1a
commit df0bb70486
8 changed files with 281 additions and 12 deletions

View File

@@ -318,6 +318,8 @@ class UploadsControllerTest < ActionDispatch::IntegrationTest
should_upload_successfully("https://www.pixiv.net/member_illust.php?mode=medium&illust_id=62247364")
should_upload_successfully("https://i.pximg.net/img-original/img/2017/08/18/00/09/21/64476642_p0.jpg")
should_upload_successfully("https://sketch.pixiv.net/items/5835314698645024323")
should_upload_successfully("https://noizave.tumblr.com/post/162206271767")
should_upload_successfully("https://media.tumblr.com/3bbfcbf075ddf969c996641b264086fd/tumblr_os2buiIOt51wsfqepo1_1280.png")