From 021ee2b9818592fbc50f99edf9182c3ac2c6bb3c Mon Sep 17 00:00:00 2001 From: theluyuan <1162963624@qq.com> Date: Thu, 14 Oct 2021 21:06:52 +0800 Subject: [PATCH] ffmpeg --- util/reptileutil.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/reptileutil.js b/util/reptileutil.js index 0d00b95..0a8d677 100644 --- a/util/reptileutil.js +++ b/util/reptileutil.js @@ -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)