Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -124,33 +124,10 @@ app.get("/api/direct", async (req, res) => {
|
|
| 124 |
|
| 125 |
const cookies = await page.cookies();
|
| 126 |
const cookieHeader = cookies.map(c => `${c.name}=${c.value}`).join("; ");
|
| 127 |
-
|
| 128 |
-
method: "GET",
|
| 129 |
-
redirect: "auto",
|
| 130 |
-
headers: {
|
| 131 |
-
"authority": "wildshare.net",
|
| 132 |
-
"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",
|
| 133 |
-
"accept-encoding": "gzip, deflate, br, zstd",
|
| 134 |
-
"accept-language": "en-US,en;q=0.9",
|
| 135 |
-
"priority": "u=0, i",
|
| 136 |
-
"referer": intermediate,
|
| 137 |
-
"sec-ch-ua": "\"Not;A=Brand\";v=\"99\", \"Google Chrome\";v=\"139\", \"Chromium\";v=\"139\"",
|
| 138 |
-
"sec-ch-ua-mobile": "?0",
|
| 139 |
-
"cookie": cookieHeader,
|
| 140 |
-
"sec-fetch-dest": "document",
|
| 141 |
-
"sec-fetch-mode": "navigate",
|
| 142 |
-
"sec-fetch-site": "same-origin",
|
| 143 |
-
"sec-fetch-user": "?1",
|
| 144 |
-
"upgrade-insecure-requests": "1",
|
| 145 |
-
"user-agent":
|
| 146 |
-
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36",
|
| 147 |
-
},
|
| 148 |
-
});
|
| 149 |
-
|
| 150 |
-
const location = response.headers.get("location");
|
| 151 |
res.json({
|
| 152 |
status: true,
|
| 153 |
-
|
| 154 |
})
|
| 155 |
} catch (err) {
|
| 156 |
res.status(500).json({ status: false, error: err.message });
|
|
|
|
| 124 |
|
| 125 |
const cookies = await page.cookies();
|
| 126 |
const cookieHeader = cookies.map(c => `${c.name}=${c.value}`).join("; ");
|
| 127 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
res.json({
|
| 129 |
status: true,
|
| 130 |
+
cookieHeader
|
| 131 |
})
|
| 132 |
} catch (err) {
|
| 133 |
res.status(500).json({ status: false, error: err.message });
|