This commit is contained in:
parent
dc46afdcc6
commit
90014aef09
@ -7,8 +7,8 @@ steps:
|
||||
image: node
|
||||
commands:
|
||||
- yarn install
|
||||
- ./node_modules/.bin/eslint *.js
|
||||
- node livres
|
||||
- yarn lint
|
||||
- yarn start
|
||||
- name: pdf
|
||||
image: linuxserver/calibre
|
||||
commands:
|
||||
|
@ -57,8 +57,8 @@ const run = async (url, authors) => {
|
||||
|
||||
content.each((i, el) => {
|
||||
if (i % 2 === 0) {
|
||||
volume = html(el).text().replace(/Volume /, '').trim()
|
||||
if (volume === '') return
|
||||
volume = parseInt(html(el).text().replace(/Volume /, '').trim())
|
||||
if (isNaN(volume)) return
|
||||
books.push(metadata(volume, title, authors, summary, description))
|
||||
} else {
|
||||
html('a', el).each((i, el) => {
|
@ -8,10 +8,15 @@
|
||||
},
|
||||
"author": "Xéfir Destiny",
|
||||
"license": "ISC",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "node .",
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"dependencies": {
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"epub-gen-funstory": "0.1.3",
|
||||
"node-fetch": "2.6.2"
|
||||
"node-fetch": "2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "7.32.0"
|
||||
|
26
yarn.lock
26
yarn.lock
@ -361,9 +361,9 @@ cookiejar@^2.1.0:
|
||||
integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==
|
||||
|
||||
core-util-is@~1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
|
||||
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
|
||||
|
||||
cp-file@^7.0.0:
|
||||
version "7.0.0"
|
||||
@ -450,9 +450,9 @@ debug@^3.1.0:
|
||||
ms "^2.1.1"
|
||||
|
||||
deep-is@^0.1.3, deep-is@~0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
|
||||
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
|
||||
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
|
||||
|
||||
degenerator@^2.2.0:
|
||||
version "2.2.0"
|
||||
@ -528,9 +528,9 @@ domhandler@^2.3.0:
|
||||
domelementtype "1"
|
||||
|
||||
domhandler@^4.0.0, domhandler@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.0.tgz#f9768a5f034be60a89a27c2e4d0f74eba0d8b059"
|
||||
integrity sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==
|
||||
version "4.2.2"
|
||||
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.2.tgz#e825d721d19a86b8c201a35264e226c678ee755f"
|
||||
integrity sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==
|
||||
dependencies:
|
||||
domelementtype "^2.2.0"
|
||||
|
||||
@ -551,9 +551,9 @@ domutils@^1.5.1:
|
||||
domelementtype "1"
|
||||
|
||||
domutils@^2.5.2, domutils@^2.6.0, domutils@^2.7.0:
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.7.0.tgz#8ebaf0c41ebafcf55b0b72ec31c56323712c5442"
|
||||
integrity sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==
|
||||
version "2.8.0"
|
||||
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135"
|
||||
integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==
|
||||
dependencies:
|
||||
dom-serializer "^1.0.1"
|
||||
domelementtype "^2.2.0"
|
||||
@ -1286,7 +1286,7 @@ netmask@^2.0.1:
|
||||
resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7"
|
||||
integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==
|
||||
|
||||
node-fetch@2.6.2:
|
||||
node-fetch@2:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.2.tgz#986996818b73785e47b1965cc34eb093a1d464d0"
|
||||
integrity sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA==
|
||||
|
Reference in New Issue
Block a user