How do I host a local clone? #227
Unanswered
HyperCodec
asked this question in
Q&A
Replies: 2 comments
-
looks like there's a bad request in Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: {
body: PassThrough {
_events: [Object],
_readableState: [ReadableState],
_writableState: [WritableState],
allowHalfOpen: true,
_maxListeners: undefined,
_eventsCount: 5,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
disturbed: false,
error: null
},
[Symbol(Response internals)]: {
url: 'https://www.google.com/async/callback:5493?fc=ErUBCndBTlVfTnFUN29LdXdNSlQ2VlZoWUIwWE1HaElOclFNU29TOFF4ZGxGbV9zbzA3YmQ2NnJyQXlHNVlrb3l3OXgtREpRbXpNZ0M1NWZPeFo4NjQyVlA3S2ZQOHpYa292MFBMaDQweGRNQjR4eTlld1E4bDlCbXFJMBIWU2JzSllkLVpHc3J5OVFPb3Q2aVlDZxoiQU9NWVJ3QmU2cHRlbjZEZmw5U0lXT1lOR3hsM2xBWGFldw&fcv=3&async=term%3Ahello%2Ccorpus%3Aen%2Chhdr%3Atrue%2Chwdgt%3Atrue%2Cwfp%3Atrue%2Cttl%3A%2Ctsl%3A%2Cptl%3A',
status: 400,
statusText: 'Bad Request',
headers: Headers { [Symbol(map)]: [Object: null prototype] },
counter: 0
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've read all code in this repo. I found this repo is used to build a Web Service Server (API server). There is a function named async function queryInternet (word, language) {
let url = new URL('https://www.google.com/async/callback:5493');
url.searchParams.set('fc', 'ErUBCndBTlVfTnFUN29LdXdNSlQ2VlZoWUIwWE1HaElOclFNU29TOFF4ZGxGbV9zbzA3YmQ2NnJyQXlHNVlrb3l3OXgtREpRbXpNZ0M1NWZPeFo4NjQyVlA3S2ZQOHpYa292MFBMaDQweGRNQjR4eTlld1E4bDlCbXFJMBIWU2JzSllkLVpHc3J5OVFPb3Q2aVlDZxoiQU9NWVJ3QmU2cHRlbjZEZmw5U0lXT1lOR3hsM2xBWGFldw');
url.searchParams.set('fcv', '3');
url.searchParams.set('async', `term:${encodeURIComponent(word)},corpus:${language},hhdr:true,hwdgt:true,wfp:true,ttl:,tsl:,ptl:`);
url = url.toString();
let response = await fetch(url, {
agent: httpsAgent,
headers: new fetch.Headers({
"accept": "*/*",
"accept-encoding": "gzip, deflate, br",
"accept-language": "en-US,en;q=0.9",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"
})
});
// Some extraneous logical code was omitted
return single_results;
} This function uses some external API, and this API appears to be private. As a result, it looks like this repo will never succeed in an on-premise deployment, because we have no way of knowing how the author maintains the dictionary data. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried cloning the repo and doing
npm i
andnode app.js
, but whenever I try to poll any word, it always gives the definition not found error. What do I need to do to get it running properly?Beta Was this translation helpful? Give feedback.
All reactions