Compare commits
4 Commits
c4d55ec6c7
...
proxy
| Author | SHA1 | Date | |
|---|---|---|---|
| 881ee4568d | |||
| 7ac32d6dff | |||
| 175a86b490 | |||
| 8f1c789c8e |
@@ -1,22 +1,21 @@
|
|||||||
A simple no-HTML random Hatsune Miku image server: https://api.miku.pics/
|
A simple no-HTML random Hatsune Miku image server. Example: https://rms.owo69.me/
|
||||||
|
|
||||||
- Click reload to get a different one. Delete left half of URL to get to source.
|
- Click reload to get a different one. Delete left half of URL to get to source.
|
||||||
- Include pornographic results: https://api.miku.pics/?allow_r18([=only](https://api.miku.pics/?allow_r18=only))
|
- Include pornographic results: https://rms.owo69.me/?allow_r18([=only](https://rms.owo69.me/?allow_r18=only))
|
||||||
- Get different sizes (original, regular, small, or thumb_mini): https://api.miku.pics/?size=thumb_mini
|
- Get different sizes (original, regular, small, or thumb_mini): https://rms.owo69.me/?size=thumb_mini
|
||||||
- Auto-refresh using HTTP Refresh header: https://api.miku.pics/?auto=3
|
- Auto-refresh using HTTP Refresh header: https://rms.owo69.me/?auto=3
|
||||||
- kek: https://api.miku.pics/?allow_r18&size=thumb_mini&auto=0
|
- kek: https://rms.owo69.me/?allow_r18&size=thumb_mini&auto=0
|
||||||
- See your history: https://api.miku.pics/log
|
- See your history: https://rms.owo69.me/log
|
||||||
- Load image by id without redirect thing: https://api.miku.pics/img/51586149
|
- Load image by id without redirect thing: https://rms.owo69.me/img/51586149
|
||||||
- Load random image directly without redirect thing: https://api.miku.pics/img/random
|
- Load random image directly without redirect thing: https://rms.owo69.me/img/random
|
||||||
- Draw Pixiv URL onto upper left corner of image: https://api.miku.pics/img/random?drawsource&size=regular
|
- Draw Pixiv URL onto upper left corner of image: https://rms.owo69.me/img/random?drawsource&size=regular
|
||||||
|
|
||||||
Here is an HTML site that makes use of it: https://random.miku.pics/
|
Here is an HTML site that makes use of it: https://lamp.tk/miku.html
|
||||||
|
|
||||||
### Issues
|
### Prerequisites
|
||||||
|
|
||||||
- Browser back button is not useful
|
|
||||||
- HTTP Refresh does not save to browser history
|
|
||||||
|
|
||||||
|
- Node.js
|
||||||
|
- GraphicsMagick for ?drawsource option
|
||||||
|
|
||||||
### todo
|
### todo
|
||||||
|
|
||||||
|
|||||||
@@ -56,12 +56,12 @@ async function serveId(id, req, res, next) {
|
|||||||
if (!url) return res.status(400).type("text").send(`size must be one of the following: ${Object.keys(pages[0].urls).join(', ')}`);
|
if (!url) return res.status(400).type("text").send(`size must be one of the following: ${Object.keys(pages[0].urls).join(', ')}`);
|
||||||
|
|
||||||
var pxreq = await fetch(url, { headers: {"Referer": "https://www.pixiv.net"} });
|
var pxreq = await fetch(url, { headers: {"Referer": "https://www.pixiv.net"} });
|
||||||
if (pxreq.status != 200 && size == "original") {
|
//if (pxreq.status != 200 && size == "original") {
|
||||||
res.header("X-Using-Backup", '1');
|
// res.header("X-Using-Backup", '1');
|
||||||
pxreq = await fetch(`https://39.hmbp.gq/https://www.pixiv.net/en/artworks/${id}?noredirect`);
|
// pxreq = await fetch(`https://39.hmbp.gq/https://www.pixiv.net/en/artworks/${id}?noredirect`);
|
||||||
}
|
//}
|
||||||
|
|
||||||
res.status(203);
|
res.status(pxreq.status);
|
||||||
res.type(pxreq.headers.get("Content-Type"));
|
res.type(pxreq.headers.get("Content-Type"));
|
||||||
res.header("Content-Disposition", `filename=${url.split('/').pop()}`);
|
res.header("Content-Disposition", `filename=${url.split('/').pop()}`);
|
||||||
res.header("X-Pixiv-Id", id);
|
res.header("X-Pixiv-Id", id);
|
||||||
|
|||||||
Generated
+412
-253
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user