Minor changes

This commit is contained in:
Peng-YM
2022-05-25 11:00:00 +08:00
parent c389aa19a2
commit 0e46d8e14d
10 changed files with 41 additions and 38 deletions

View File

@@ -9,14 +9,14 @@ export default async function download(url, ua) {
return cache.get(id);
}
const $http = HTTP({
const http = HTTP({
headers: {
'User-Agent': ua,
},
});
const result = new Promise((resolve, reject) => {
$http.get(url).then((resp) => {
http.get(url).then((resp) => {
const body = resp.body;
if (body.replace(/\s/g, '').length === 0)
reject(new Error('订阅内容为空!'));