This commit is contained in:
parent
4a57f12921
commit
822a92f6b3
10
livres.js
10
livres.js
@ -1,7 +1,7 @@
|
||||
const fs = require('fs')
|
||||
const cheerio = require('cheerio')
|
||||
const fetch = require('node-fetch')
|
||||
const epub = require('epub-gen')
|
||||
import fs from 'fs'
|
||||
import cheerio from 'cheerio'
|
||||
import fetch from 'node-fetch'
|
||||
import Epub from 'epub-gen'
|
||||
|
||||
if (!fs.existsSync('output')) {
|
||||
fs.mkdirSync('output')
|
||||
@ -70,7 +70,7 @@ const run = async (url, authors) => {
|
||||
book.content.push(await fetchPage(link))
|
||||
}
|
||||
|
||||
new epub(book)
|
||||
new Epub(book)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -15,5 +15,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "7.32.0"
|
||||
}
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
|
Reference in New Issue
Block a user