mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix: 地震速报报错 (#6366)
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = async (ctx) => {
|
||||
const typeName = typeMappings[type];
|
||||
|
||||
const response = await got(api);
|
||||
const data = response.data;
|
||||
const data = response.data.replace(/,"page":"(.*?)","num":/, ',"num":');
|
||||
let json = JSON.parse(data.substring(1, data.length - 1)).shuju;
|
||||
if (json.length > 20) {
|
||||
json = json.slice(0, 20);
|
||||
|
||||
Reference in New Issue
Block a user