mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 14:07:54 +08:00
refactor: rename axios to got
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const axios = require('@/utils/axios');
|
||||
const got = require('@/utils/got');
|
||||
const common = require('./common');
|
||||
const cheerio = require('cheerio');
|
||||
const dayjs = require('dayjs');
|
||||
@@ -6,7 +6,7 @@ const dayjs = require('dayjs');
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
|
||||
const response = await axios({
|
||||
const response = await got({
|
||||
method: 'post',
|
||||
url: 'https://app.jike.ruguoapp.com/1.0/messages/history',
|
||||
headers: {
|
||||
@@ -44,7 +44,7 @@ module.exports = async (ctx) => {
|
||||
if (cache) {
|
||||
item.description = cache;
|
||||
} else {
|
||||
const { data } = await axios.get(newsUrl);
|
||||
const { data } = await got.get(newsUrl);
|
||||
const $ = cheerio.load(data);
|
||||
const upper = $('ul.main > li.item');
|
||||
const links = upper.find('a').map((_, ele) => $(ele).attr('href'));
|
||||
|
||||
Reference in New Issue
Block a user