format
This commit is contained in:
parent
d64ca7b724
commit
83a1e4a574
|
|
@ -2,12 +2,12 @@ const axios = require('../../utils/axios');
|
|||
|
||||
module.exports = async (ctx) => {
|
||||
const seasonid = ctx.params.seasonid;
|
||||
let response = await axios({
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: `https://bangumi.bilibili.com/anime/${seasonid}`,
|
||||
});
|
||||
|
||||
let data = JSON.parse(response.data.match(/window\.__INITIAL_STATE__=([\s\S]+);\(function\(\)/)[1]) || {};
|
||||
const data = JSON.parse(response.data.match(/window\.__INITIAL_STATE__=([\s\S]+);\(function\(\)/)[1]) || {};
|
||||
|
||||
ctx.state.data = {
|
||||
title: data.mediaInfo.chn_name,
|
||||
|
|
|
|||
Loading…
Reference in New Issue