MCPcopy Create free account
hub / github.com/Moli-X/Resources / requestPrice

Function requestPrice

Script/TBPrice.js:166–184  ·  view source on GitHub ↗
(share_url, callback)

Source from the content-addressed store, hash-verified

164}
165
166function requestPrice(share_url, callback) {
167 const options = {
168 url: "https://apapia-history.manmanbuy.com/ChromeWidgetServices/WidgetServices.ashx",
169 headers: {
170 "Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
171 "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 - mmbWebBrowse - ios"
172 },
173 body: "methodName=getHistoryTrend&p_url=" + encodeURIComponent(share_url)
174 }
175 $tool.post(options, function (error, response, data) {
176 if (!error) {
177 callback(JSON.parse(data));
178 if (consoleLog) console.log("Data:\n" + data);
179 } else {
180 callback(null, null);
181 if (consoleLog) console.log("Error:\n" + error);
182 }
183 })
184}
185
186function dateFormat(cellval) {
187 const date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10));

Callers 1

TBPrice.jsFile · 0.85

Calls 3

postMethod · 0.45
parseMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected