Skip to content

Commit

Permalink
fix: rog ally
Browse files Browse the repository at this point in the history
  • Loading branch information
qiin2333 committed Jun 13, 2023
1 parent 658e0c0 commit 0fef19a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,13 @@ export default class MonkeyMaster {
referer: `https://item.jd.com/${skuId}.html`,
headers: this.headers,
});
// await logger.info(await res.text())
const retJson = str2Json(await res.text());
return retJson['url'] ? 'https:' + retJson['url'] : '';

let ret = '';
try {
const resObj = str2Json(await res.text());
ret = resObj['url'] ? 'https:' + resObj['url'] : '';
} catch (error) {}
return ret;
}

/**
Expand Down

0 comments on commit 0fef19a

Please sign in to comment.