Danbooru

New Pixiv image links?

Posted under Bugs & Features

Lunatic6 said:

The effect isn't that harmful as long as pixiv is willing to keep the old URLs. I just hope there is something that we could use to generate an old pixiv URL from the new pixiv URL.

So long as the old-style URLs continue to work, my daily scans will automatically replace the new-style with the old-style URLs (assuming they aren't deleted by scan time and exactly match the Danbooru images).

And as I mentioned in topic #9127/p72, the Pixiv Direct Links script turns thumbnail titles into direct links to images using the old-style (only works for new images if you're on Firefox or have GM_xmlhttpRequest available).

So we have those... neat, though I felt like I have wasted so much time fixing those source links. Anyway I'll still continue to put the old pixiv URLs on my uploads to redirect them to the pixiv page.

RaisingK said:

So long as the old-style URLs continue to work, my daily scans will automatically replace the new-style with the old-style URLs (assuming they aren't deleted by scan time and exactly match the Danbooru images).

And as I mentioned in topic #9127/p72, the Pixiv Direct Links script turns thumbnail titles into direct links to images using the old-style (only works for new images if you're on Firefox or have GM_xmlhttpRequest available).

How could you generate the old one though? Are you using the artist DB in danbooru or through pixiv itself?

And, find artist feature will be ruined if you didn't do this replacing I think?

fireattack said:

How could you generate the old one though? Are you using the artist DB in danbooru or through pixiv itself?

And, find artist feature will be ruined if you didn't do this replacing I think?

You derive the base URL (e.g. "http://i2.pixiv.net/img02/img/b04019/") from either the artist's old images, their pixiv profile image, or the pixiv API (my program uses the API), then tack on the illust ID and file extension of the new image to get the complete URL.

Find Artist is currently broken with the new URLs; that's part of issue #2261.

RaisingK said:

And as I mentioned in topic #9127/p72, the Pixiv Direct Links script turns thumbnail titles into direct links to images using the old-style (only works for new images if you're on Firefox or have GM_xmlhttpRequest available).

Never been able to actually make that (and similar) work. GM says it is active, but the urls and links are the same, except mode big opens in the same tab.

Updated

CodeKyuubi said:

That sounds extremely annoying and tedious.

We choose to do this not because it is easy, but because it is hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win.

CodeKyuubi said:

That sounds extremely annoying and tedious.

Tedious, yes. But, it's just an extra few seconds.

Edit: If all else, copy&paste the source link w/ DanbooruUp as per Kikimaru's suggestion.
Edit2: Sorta works.

Updated

ElectricSheep said:

I have updated my userscript to work with the the new format: https://github.com/an-electric-sheep/userscripts

Is there any documentation on that API? Or any examples?

No documentation. Pixiv Direct Links and Pixiv++ use it, you can look through Google results for it, and my notes:

notes
not-manga:
"30095810","34904","jpg","とうほう。","4","ハマー@3日目東P48b","http://i2.pixiv.net/img04/img/aenobas/mobile/30095810_128x128.jpg?1348946035",,,"http://i2.pixiv.net/img04/img/aenobas/mobile/30095810_480mw.jpg?1348946035",,,"2012-09-14 00:01:30","東方 博麗霊夢 霧雨魔理沙 愛を感じる 集合絵 壁紙 東方Project250users入り","SAI","437","4321","10464","9/30<br />いなかった子たち追加しました!<br />これで全員のはず…!<br />(旧作など除く)<br />紅楼夢には全員分のラミカを持っていけそうです。",,,,"363","6","aenobas",,"0",,,"http://i2.pixiv.net/img04/profile/aenobas/mobile/6071730_80.jpg",

manga:
"30047501","34904","jpg","ねこねこレイマリ","4","ハマー@みみけっと八雲09","http://i2.pixiv.net/img04/img/aenobas/mobile/30047501_128x128.jpg",,,"http://i2.pixiv.net/img04/img/aenobas/mobile/30047501_480mw.jpg",,,"2012-09-11 20:18:34","東方 博麗霊夢 霧雨魔理沙 レイマリ なにこれ可愛い","SAI","219","2183","2699","http://www.pixiv.net/member_illust.php?mode=medium&amp;illust_id=30033309の猫たちと暮らしたい妄想<br />首輪が嫌いなアクティブ霊夢と<br />本を与えておくと大人しくなるインドア魔理沙","2",,,"96","2","aenobas",,"0",

animated image:
"44313524","3246089","jpg","うごくイラスト機能と聞いて","79","くぅる","http://i1.pixiv.net/c/128x128/img-master/img/2014/06/26/01/08/59/44313524_square1200.jpg",,,"http://i1.pixiv.net/c/480x960/img-master/img/2014/06/26/01/08/59/44313524_master1200.jpg",,,"2014-06-26 01:08:59","うごイラ 魔法少女まどか☆マギカ 暁美ほむら","IllustStudio","7","70","174","以前動画用に描いたものでテストです。ホントに動いたスゴイヨ!",,,,"8","0","riku8671",,"0",,,"http://i1.pixiv.net/img79/profile/riku8671/mobile/5490053_80.jpg",

0: illust id
1: user ID #
2: extension
3: image title
4: "4"
5: artist nickname
6: mobile thumbnail (128x128), can be INF form
7: ,
8: ,
9: mobile thumbnail (480mw)
10: ,
11: ,
12: upload date
13: space-delimited list of tags
14: drawing software (e.g. SAI)
15: number of ratings
16: [Total], whatever that is
17: number of views
18: image description (raw HTML)
19: number of pages (empty if not a manga sequence)
20: ,
21: ,
22: # favorites,
23: "3",
24: artist username
25: ,
26: "0",
27: ,
28: ,
29: mobile profile image

//Private images (MyPicks etc...) have an illust id of 0 and a generic thumbnail.

Updated

My observations on the API:

You have to login to Pixiv and pass the PHPSESSID cookie as a query parameter to the API, otherwise the API returns an empty response for R-18 images. So the API request should look like http://spapi.pixiv.net/iphone/illust.php?illust_id=1234&PHPSESSID=XXX, where you get PHPSESSID from document.cookie.

For images that have been deleted (i.e., bad id), or if you query for a R-18 image but don't pass a valid PHPSESSID, the API returns a "200 OK" HTTP code but an empty response.

Field 4 is the image directory. As in, for http://i2.pixiv.net/img78/img/demekyon/46187950.jpg the image directory is 78.

Field 9, the mobile thumbnail URL, also contains the revision timestamp if it's a revision. This is the only way I know of to detect revised images now.

For post #1803792, which is a recent revised image, the URLs seem to work like this:

This means that:

1 2 3 4 5