This commit is contained in:
2021-10-14 21:06:52 +08:00
parent f5de9d3db9
commit 021ee2b981

View File

@@ -3,11 +3,13 @@ import cheerio from "cheerio"
import axios from "axios"
class Reptile {
// 初始化代理
constructor(proxy) {
if (proxy) {
axios.defaults.proxy = proxy
}
}
// 通过名字搜索
async find(name) {
let url = `https://dmhy.anoneko.com/topics/list?keyword=${name}`
url = encodeURI(url)
@@ -30,6 +32,7 @@ class Reptile {
})
console.log(JSON.stringify(list))
}
// 获取[]中间的内容 目前通过这个获取第几集
async getepisode(name) {
// let re = /\[.*?\]/g
let episode = name.match( /(?<=\[).*?(?=\])/g)