()
| 111 | |
| 112 | |
| 113 | async 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 |
no test coverage detected