MCPcopy Create free account
hub / github.com/NobyDa/Script / GetCookie

Function GetCookie

BDTieBa-DailyBonus/TieBa.js:231–244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229}
230
231function GetCookie() {
232 let headerCookie = $request.headers["Cookie"] || $request.headers["cookie"];
233 if (headerCookie && headerCookie.includes('BDUSS=')) {
234 if (!cookieVal) {
235 $nobyda.notify("写入百度贴吧Cookie成功 🎉", "", "");
236 } else {
237 console.log(`写入百度贴吧Cookie成功 🎉`);
238 }
239 $nobyda.write(headerCookie, "CookieTB")
240 } else {
241 console.log(`写入Cookie失败, BDUSS值缺失. `);
242 }
243 return $nobyda.done();
244}
245
246function nobyda() {
247 const isRequest = typeof $request != "undefined"

Callers 1

TieBa.jsFile · 0.70

Calls 4

notifyMethod · 0.45
logMethod · 0.45
writeMethod · 0.45
doneMethod · 0.45

Tested by

no test coverage detected