MCPcopy Create free account
hub / github.com/6dylan6/jdm / getData

Function getData

jd_computer.js:281–303  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

279 })
280}
281function getData(url) {
282 return new Promise(async resolve => {
283 const options = {
284 url: `${url}?${new Date()}`, "timeout": 10000, headers: {
285 "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
286 }
287 };
288 $.get(options, async (err, resp, data) => {
289 try {
290 if (err) {
291 } else {
292 if (data) data = JSON.parse(data)
293 }
294 } catch (e) {
295 // $.logErr(e, resp)
296 } finally {
297 resolve(data);
298 }
299 })
300 await $.wait(10000)
301 resolve();
302 })
303}
304/*
305 *Progcessed By JSDec in 0.01s
306 *JSDec - JSDec.js.org

Callers 1

jd_computer.jsFile · 0.70

Calls 2

getMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected