Compare commits

..

No commits in common. "fad66e6945271e553d93b45e6448fe5c7f0c118a" and "d2ec6b2861736112b4252e4ba911206385499c4f" have entirely different histories.

View File

@ -74,9 +74,7 @@ export async function pixivToPleroma(illust_id) {
try {
var {illust, images} = await downloadPixivIllust(illust_id);
await postStatus({
status: `https://www.pixiv.net/en/artworks/${illust_id}`
+ ((images.length > 4) ? '\n⚠ >4 img' : '')
+ ((illust.illustType == 2) ? '\n⚠ ugoira conversion not implemented' : ''),
status: `https://www.pixiv.net/en/artworks/${illust_id}`,
files: images,
visibility: "unlisted",
sensitive: Boolean(illust.xRestrict)
@ -96,9 +94,8 @@ if (import.meta.main) Deno.serve({
hostname: "127.0.0.1"
}, async (req, info) => {
var {pathname} = new URL(req.url);
console.log(info.remoteAddr.hostname, req.headers.get('x-forwarded-for'), pathname);
console.log(info.remoteAddr.hostname, pathname);
try {
switch (pathname) {
case "/ajax/illusts/bookmarks/add":
var payload = await req.clone().json();
@ -127,10 +124,6 @@ if (import.meta.main) Deno.serve({
}
break;
}
} catch (error) {
console.error("payload error:", error.stack);
}
return fetch("https://www.pixiv.net"+pathname, {
method: req.method,
headers: req.headers,