2 Commits

Author SHA1 Message Date
SNEK WAIFU
e92cb6ca8a ee 2026-05-14 08:09:23 +07:00
SNEK WAIFU
85a45cf575 eeee 2026-05-14 08:09:04 +07:00
3 changed files with 14 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "lustpress",
"version": "8.3.4-alpha",
"version": "8.3.5-alpha",
"description": "RESTful and experimental API for PH and other R18 websites",
"main": "src/index.ts",
"scripts": {

View File

@@ -9,7 +9,7 @@ const keyv = process.env.REDIS_URL
: new Keyv();
keyv.on("error", (err) => console.log("Connection Error", err));
const ttl = 1000 * 60 * 60 * Number(process.env.EXPIRE_CACHE);
const ttl = 1000 * 60 * 60 * Number(process.env.EXPIRE_CACHE || "1");
const GEO_TIMEOUT_MS = 3000;
let cachedLastLocation: string | null = null;
@@ -89,6 +89,17 @@ class LustPress {
const headers: Record<string, string> = {
"User-Agent": isPornhub ? this.browserUA : this.useragent,
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"Accept-Language": "en-US,en;q=0.9",
"Accept-Encoding": "gzip, deflate, br",
"Sec-Ch-Ua": '"Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"',
"Sec-Ch-Ua-Mobile": "?0",
"Sec-Ch-Ua-Platform": '"Windows"',
"Sec-Fetch-Dest": "document",
"Sec-Fetch-Mode": "navigate",
"Sec-Fetch-Site": "none",
"Sec-Fetch-User": "?1",
"Upgrade-Insecure-Requests": "1"
};
if (isPornhub) {

View File

@@ -30,7 +30,6 @@ const app = new Elysia()
server: await lust.getServer(),
version: pkg.version,
}))
.use(scrapeRoutes)
.onError(({ code, error, set }) => {
if (code === "NOT_FOUND") {
set.status = 404;
@@ -60,6 +59,7 @@ const app = new Elysia()
stack: (error as Error).stack,
};
})
.use(scrapeRoutes)
.listen(process.env.PORT || 3000);
console.log(