Open digitalrorschach opened 3 years ago
@digitalrorschach the values in the cli command need to go without the < and > characters, in your example it'd be:
./cli.js -b "9781491952016" -c "uhn7fxvjku8442ejdljcnn2kcueke3df"
before running that command, you have to remove the session.json
if it was created before
ok so I ran the command
node ./cli.js -b "9781491952016" -c "uhn7fxvjku8442ejdljcnn2kcueke3df"
and got this result: ` :::::::: ::: ::::::::: :::::::: :::::::: ::: ::: :::::::: :+: :+: :+ :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +#+ +:+ +#++:++#+ +#+ +:+ +#+ +:+ +#++:++ +#++:++#++ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+
######## ######### ######## ######## ### ### ########
+:++:++:++:+ using stored cookies`
And it just just stays stuck on this screen... I left it running overnight to see if it's just process something, but it's still stuck on this screen...
@digitalrorschach is this solved?
@jenni No I'm still having problems. I come by to check each month. I updated Obooks and I entered this command at CLI:
node ./cli.js -b "9781138828421" -c "n63x1sl65xb4k30hhiuim91v09iu4msh"
And I get this in return
:::::::: ::: ::::::::: :::::::: :::::::: ::: ::: ::::::::
:+: :+: :+ :+: :+: :+: :+: :+: :+: :+: :+: :+: :+:
+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+
+#+ +:+ +#++:++#+ +#+ +:+ +#+ +:+ +#++:++ +#++:++#++
+#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+
#+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+#
######## ######### ######## ######## ### ### ########
+:++:++:++:+ using stored cookies
+:++:++:++:+ downloading: The Indie Game Developer Handbook
+:++:++:++:+ 15 chapters to download, please wait...
(node:11532) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined
at OBook.create (D:\dev\obooks\lib\OBook.js:42:45)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11532) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:11532) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
RequestError: Error: connect ETIMEDOUT 151.101.49.132:443
at new RequestError (D:\dev\obooks\node_modules\request-promise-core\lib\errors.js:14:15)
at Request.plumbing.callback (D:\dev\obooks\node_modules\request-promise-core\lib\plumbing.js:87:29)
at Request.RP$callback [as _callback] (D:\dev\obooks\node_modules\request-promise-core\lib\plumbing.js:46:31)
at self.callback (D:\dev\obooks\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request.onRequestError (D:\dev\obooks\node_modules\request\request.js:881:8)
at ClientRequest.emit (events.js:315:20)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
cause: Error: connect ETIMEDOUT 151.101.49.132:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
errno: -4039,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '151.101.49.132',
port: 443
},
error: Error: connect ETIMEDOUT 151.101.49.132:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
errno: -4039,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '151.101.49.132',
port: 443
},
options: {
uri: 'https://learning.oreilly.com/api/v1/book/9781138828421/chapter/xhtml/Ch03.xhtml',
method: 'GET',
followAllRedirects: true,
resolveWithFullResponse: true,
headers: {
Accept: '*/*',
'Cache-Control': 'no-cache',
Cookie: 'n63x1sl56xb4k60hhiuim67v09iu4msh',
Connection: 'keep-alive'
},
body: null,
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
transform2xxOnly: false
},
response: undefined
@digitalrorschach please pull the latest changes and try downloading the book again... it has worked on my end. also make sure that your subscription to O'Reilly is active at the moment of downloading the book.
@jenni Ok I will pull and try to download again
@jenni I pulled the latest changes today and varified my subscription and I get error
Error: Cannot find module 'commander'
Require stack:
- D:\dev\obooks\cli.js
[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:725:27)[39m
[90m at Module.require (internal/modules/cjs/loader.js:952:19)[39m
[90m at require (internal/modules/cjs/helpers.js:88:18)[39m
at Object.<anonymous> (D:\dev\obooks\cli.js:3:17)
[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)[39m
[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)[39m
[90m at Module.load (internal/modules/cjs/loader.js:928:32)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)[39m
[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)[39m {
code: [32m'MODULE_NOT_FOUND'[39m,
requireStack: [ [32m'D:\\dev\\obooks\\cli.js'[39m ]
}
I installed Node.JS and it's dependencies I ran npm install
I'm trying to download a book using the CLI method, but I keep getting
StatusCodeError: 404 - {"error":"Could not fetch work"}
Here is the command I ran:node cli.js -b "<9781491952016>" -c "<uhn7fxvjku8442ejdljcnn2kcueke3df>"
Here is the full output. I don't know JavaScript, so maybe this is something super simple to solve?