Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Use @adobe/fetch to defeat anti-bot measures.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Jul 24, 2023
1 parent f9014a7 commit 7937aaa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"sh/bunTest.sh"
],
"dependencies": {
"@adobe/fetch": "^4.0.13",
"undici": "^5.21.0",
"ws": "^8.13.0"
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/monalisa.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ let Monalisa = class extends CustomEventSource {
"headers": this.getGraphQlHeaders(graphQlBody.length),
"method": "POST",
"body": graphQlBody,
"signal": AbortSignal.timeout(10000),
// "signal": AbortSignal.timeout(10000),
"noCookies": true,
"oneshot": true
});
Expand Down
2 changes: 1 addition & 1 deletion src/node/prefix.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"use strict";import{WebSocket,WebSocketServer as WebSocketService}from"ws";import{fetch,Request,Response}from"undici";import os from"node:os";import fs from"node:fs";import http from"node:http";import crypto from"node:crypto";
"use strict";import{WebSocket,WebSocketServer as WebSocketService}from"ws";import{Request,Response}from"undici";import{fetch}from"@adobe/fetch";import os from"node:os";import fs from"node:fs";import http from"node:http";import crypto from"node:crypto";
if(!globalThis.self){globalThis.self=globalThis};

0 comments on commit 7937aaa

Please sign in to comment.