mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-11 15:47:48 +08:00
refactor: rename axios to got
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
const axios = require('@/utils/axios');
|
||||
const got = require('@/utils/got');
|
||||
const qs = require('querystring');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const link = 'https://www.icourse163.org/category/all';
|
||||
const homePage = await axios({
|
||||
const homePage = await got({
|
||||
method: 'get',
|
||||
url: link,
|
||||
});
|
||||
const csrfKey = homePage.headers['set-cookie'][0].split(';')[0].split('=')[1];
|
||||
|
||||
const response = await axios({
|
||||
const response = await got({
|
||||
method: 'post',
|
||||
url: `https://www.icourse163.org/web/j/courseBean.getCoursePanelListByFrontCategory.rpc?csrfKey=${csrfKey}`,
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user