Compare commits

...

4 Commits

Author SHA1 Message Date
lamp 881ee4568d Update 'README.md' 2023-02-04 21:44:02 -06:00
lamp 7ac32d6dff update urls 2023-02-05 03:35:33 +00:00
lamp 175a86b490 Merge branch 'proxy' of gitea.moe:lamp/random-miku-server into proxy 2023-02-05 03:29:25 +00:00
lamp 8f1c789c8e remove backup origin 2023-02-05 03:28:29 +00:00
3 changed files with 430 additions and 272 deletions
+13 -14
View File
@@ -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.
- Include pornographic results: https://api.miku.pics/?allow_r18([=only](https://api.miku.pics/?allow_r18=only))
- Get different sizes (original, regular, small, or thumb_mini): https://api.miku.pics/?size=thumb_mini
- Auto-refresh using HTTP Refresh header: https://api.miku.pics/?auto=3
- kek: https://api.miku.pics/?allow_r18&size=thumb_mini&auto=0
- See your history: https://api.miku.pics/log
- Load image by id without redirect thing: https://api.miku.pics/img/51586149
- Load random image directly without redirect thing: https://api.miku.pics/img/random
- Draw Pixiv URL onto upper left corner of image: https://api.miku.pics/img/random?drawsource&size=regular
- 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://rms.owo69.me/?size=thumb_mini
- Auto-refresh using HTTP Refresh header: https://rms.owo69.me/?auto=3
- kek: https://rms.owo69.me/?allow_r18&size=thumb_mini&auto=0
- See your history: https://rms.owo69.me/log
- Load image by id without redirect thing: https://rms.owo69.me/img/51586149
- Load random image directly without redirect thing: https://rms.owo69.me/img/random
- 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
- Browser back button is not useful
- HTTP Refresh does not save to browser history
### Prerequisites
- Node.js
- GraphicsMagick for ?drawsource option
### todo
+5 -5
View File
@@ -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(', ')}`);
var pxreq = await fetch(url, { headers: {"Referer": "https://www.pixiv.net"} });
if (pxreq.status != 200 && size == "original") {
res.header("X-Using-Backup", '1');
pxreq = await fetch(`https://39.hmbp.gq/https://www.pixiv.net/en/artworks/${id}?noredirect`);
}
//if (pxreq.status != 200 && size == "original") {
// res.header("X-Using-Backup", '1');
// 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.header("Content-Disposition", `filename=${url.split('/').pop()}`);
res.header("X-Pixiv-Id", id);
+412 -253
View File
File diff suppressed because it is too large Load Diff