r888888888/danbooru — pull request #2263 by evazion (2014-10-04 18:28:52+00:00)
Title: Fix artist finder and URL rewriting for new Pixiv URLs

Second try at a partial fix for issue #2261. This fixes the artist finder and the URL rewriter to work with new Pixiv URLs. Several other small bugs were fixed along the way; see the individual commits for details.

* ec0f226: Fixes the artist finder so that it works with new Pixiv URLs.
* 964b5ef: Rewrites `/img-master/` thumbnail URLs into `/img-original/` full size URLs.
* 964b5ef: Also fixes an existing bug that caused medium manga thumbnails to be rewritten incorrectly. Handling this case is what makes 964b5ef a little complicated.

http://www.pixiv.net/member_illust.php?mode=medium&illust_id=46170939
http://i2.pixiv.net/img04/img/syounen_no_uta/46170939_m.jpg
were incorrectly rewritten to: http://i2.pixiv.net/img04/img/syounen_no_uta/46170939.jpg
when they should be: http://i2.pixiv.net/img04/img/syounen_no_uta/46170939_big_p0.jpg

* 339e885: Adds more extensive testing that URL rewriting and fetching source data works for all types of Pixiv URLs.
* 58f0ec3 is the punchline to all of this. It makes it so you can use the bookmarklet to upload directly from `mode=medium` pages without having to open the full size image first.