MCPcopy Create free account
hub / github.com/anyehttp/quantumult-x / fetchSignInOnce

Method fetchSignInOnce

task/v2ex.js:113–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111
112
113async fetchSignInOnce() {
114 console.log(`正在获取html`);
115 try {
116 const options = {
117 url: 'https://www.v2ex.com/mission/daily',
118 headers: {
119 "user-agent": "(Mozilla/5.0 (iPhone; CPU iPhone OS 15_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Mobile/15E148 Safari/604.1",
120 "cookie": this.token
121 }
122 };
123 const data = await httpRequest(options);
124 const htmlString = JSON.stringify(data);
125 $.setdata(htmlString, "v2ex_html");
126 console.log(`✅获取html完成`);
127 } catch (error) {
128 console.error(error);
129 }
130}
131
132
133

Callers 1

mainFunction · 0.80

Calls 3

httpRequestFunction · 0.70
logMethod · 0.45
setdataMethod · 0.45

Tested by

no test coverage detected