Danbooru

Danbooru Upload Bookmarklet Mk II

Posted under General

I tested this out (but didn't upload) with the violin Youmu Deviantart post. The source URL ended up being:

http://www.deviantart.com/download/187271989/violin_youmu_by_vinhnyu-d33hvzp.jpg#original-url=http://vinhnyu.deviantart.com/art/Violin-Youmu-187271989

First of all, Find Artist did not work with this.

Second of all, is the #original-url= stuff intended to be there along with the direct image link? Am I doing something wrong, or should I just manually cut the source URL down to http://vinhnyu.deviantart.com/art/Violin-Youmu-187271989 which, to my understanding, is how DA sources are to be listed? (Please correct me on that last bit if I'm wrong.)

You're supposed to edit the post and cut the source URL down to http://vinhnyu.deviantart.com/art/Violin-Youmu-187271989 after the post has been uploaded. Once you've done that Find Artist will work.

To use Find Artist on the upload page itself you have to temporarily cut the URL down, hit Find Artist, then use undo to restore the URL before you upload.

The point of this #original-url= business is just to make it a little easier to fix the source URL after uploading. It saves you the trouble of having to go back to dA to copy & paste the original URL.

スラッシュ said:
Is it possible to get the full size from this? http://piapro.jp/t/JGTN

It's pretty fucking vile, but I managed to get around most of the nastiness, and I have the bookmarklet code to submit the fullsize URLs now. However, it won't serve any content if you're not logged in, which means danbooru won't be able to retrieve the image until albert adds support for sending appropriate cookies to piapro.

Edit: I've uploaded the version with piapro support and updated the changelog, but it won't be useful until the appropriate Trac ticket is resolved.

Updated

I've created a new track ticket for allowing more URLs to be specified than just the image URLs. That'd allow, amongst other things, the artist finder to work on dA, pipa.jp and others' uploads, and enable us to get rid of the #original-url= hack.

Right now I see at least two extra fields to be specified:

  • "Context", to aid the artist finder to work (and perhaps enable generation of current pixiv-style links, where the actual target is the containing post page).
  • "Override source" boolean flag, which if specified would cause the context to take priority over the actual image URL and make it be recorded as the source. This is necessary for Twitpic, since its URLs expire.

I'd especially appreciate comments from evazion, zatchii, and whoever else writes code against the danbooru API.

Quick note on another subject: after uploading post #887448 using the bookmarklet I got one of those automated messages about pixiv sample images, ie.

You gave this post the source of a pixiv manga sample ( http://img01.pixiv.net/img/u10/17788691_p1.jpg?1301566930 ), but it was actually the full size ( http://img01.pixiv.net/img/u10/17788691_big_p1.jpg?1301566930 )--either it wasn't uploaded from the URL you supplied, or the sample version is identical to the original.

Obviously it doesn't actually matter, but to avoid it, I guess you should always give the big url. Unless there's a reason why it's worked out like that? Not a big deal.

Log said:
It's a local issue it just means it can't load the cached copy of the file.

Yes, but Chrom(e/ium) manages to send the right headers so that it doesn't get 403. I'll see if making it use an iframe instead helps.

I'm not sure if it's just me, or if something changed in the last revision of the script or on Pixiv itself. Lately though, if I try to trigger this bookmark from a Pixiv medium page, the script tries to upload the artist's avatar rather than the large version of the image proper. This happens for me even after turning off Adblock Plus and Greasemonkey. Has anyone else had a similar problem, or have any ideas for why this might have changed?

1 2 3 4