换系统

This commit is contained in:
pplokijuhyg 2019-12-26 17:37:51 +08:00
parent 1be20ea269
commit a3a4991dd1
13 changed files with 3472 additions and 3469 deletions

View File

@ -20,3 +20,4 @@ async function downloadFile(url, filepath, name) {
}); });
} }
// downloadFile("https://www.cnblogs.com/images/logo_small.gif",__dirname + "/dow",'asd.gif') // downloadFile("https://www.cnblogs.com/images/logo_small.gif",__dirname + "/dow",'asd.gif')
module.exports = downloadFile

View File

@ -36,7 +36,7 @@ let gethtml = async (name, page) => {
let getlist = async (name) => { let getlist = async (name) => {
let html; let html;
html = await gethtml(name, 1) html = await gethtml(name, 1)
console.log(html) console.log(JSON.stringify(html))
return html; return html;
} }
getlist("偷星九月天") getlist("偷星九月天")

View File

@ -2,9 +2,10 @@ const convert = require('webp-batch-convert');
let webg = async (dir) => { let webg = async (dir) => {
console.log(dir)
const cwebpOpts = { const cwebpOpts = {
quiet: true, // 不输出详情 quiet: true, // 不输出详情
q: 5 // 质量 q: 1// 质量
}; };
// 清空输出目录 // 清空输出目录
// convert.utils.delDir(__dirname + '/webp'); // convert.utils.delDir(__dirname + '/webp');
@ -15,4 +16,5 @@ let webg = async (dir) => {
convert.utils.delDir(dir, /\.png$/); convert.utils.delDir(dir, /\.png$/);
return res; return res;
} }
webg(__dirname + "\\img")
module.exports = webg module.exports = webg