Reddit-Enhancement-Suite icon indicating copy to clipboard operation
Reddit-Enhancement-Suite copied to clipboard

Update pixiv.js to new embed URL

Open valdearg opened this issue 2 years ago • 0 comments

Seems that pixiv changed the embed code URL. There's an API which generates an iframe URL which can be accessed at the URL: https://embed.pixiv.net/oembed.php?url=https%3A%2F%2Fwww.pixiv.net%2Fen%2Fartworks%2F94743400 (94743400 being an example ID)

This returns back:

"html": "<iframe width=\"600\" height=\"315\" src=\"https://embed.pixiv.net/oembed_iframe.php?type=illust&id=94743400\" frameborder=\"0\"></iframe>",

The only thing is that the embed no longer seems to size the images it turns any more, it's usually a "part" of the image.

Example from here: https://github.com/medjedqt/kiyobot/issues/16

So it seems like this is intentional so may have to suffice.

Relevant issue: Tested in browser:

valdearg avatar Jul 24 '22 20:07 valdearg