Skip to content

Commit

Permalink
fix: 写入书籍名不应有后缀
Browse files Browse the repository at this point in the history
  • Loading branch information
Cansiny0320 committed May 29, 2021
1 parent d02f1f6 commit f39ffac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ export class Spider {
const write = () => {
contents.forEach((item, index) => {
if (index === 0) {
logger.await(`正在写入:${bookName}...`)
const info = `『${bookName}』\n『作者:${author}』\n『简介:${description}』\n`
logger.await(`正在写入:${raw}...`)
const info = `『${raw}』\n『作者:${author}』\n『简介:${description}』\n`
fs.appendFileSync(`${DOWNLOAD_PATH}/${bookName}.txt`, info)
}
if (index === contents.length - 1) {
Expand Down

0 comments on commit f39ffac

Please sign in to comment.