Giter Site home page Giter Site logo

juejinxiaoce's People

Contributors

fossabot avatar oliyg avatar spencer17x avatar yangchendoit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

juejinxiaoce's Issues

Mac平台

执行 npm i 后会下载Chromium到node_modules/puppeteer/.local-chromium/mac-609904/chrome-mac
将chrome-mac直接复制到项目根目录

目录结构如下
├── chrome-mac
├── dist
├── node_modules
├── CODE_OF_CONDUCT.md
├── LICENSE
├── app.js
├── constant.js
├── converter.js
├── package-lock.json
├── package.json
└── readme.md

然后将根目录下app.js中第17行
executablePath: './chrome-win/chrome.exe',
替换为
executablePath: './chrome-mac/Chromium.app/Contents/MacOS/Chromium',

保存后执行 npm start

等待结束即可

ps:过程中下载html文件时提示all finished: false,不确定是否判断条件未适配macOS系统,但完成后并没有什么问题

感谢git主的辛勤劳动和无私精神!

运行报错

===navagating to main page
===login...
===getting book section list
===getting book HTML content
开篇词 —— 小册食用指南
===writing html...
===getting book HTML content
===write html file success
===writing markdown...
===write markdown file success
(node:15252) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at validateString (internal/validators.js:125:11)
at Object.resolve (path.js:161:7)
at mkdir (C:\Users\Lerix\AppData\Roaming\npm\node_modules@oliyg\juejinxiaoce\utils.js:7:26)
at Juejin.copyToPWDDir (C:\Users\Lerix\AppData\Roaming\npm\node_modules@oliyg\juejinxiaoce\app.js:26:5)
at juejin.getContentHTML (C:\Users\Lerix\AppData\Roaming\npm\node_modules@oliyg\juejinxiaoce\app.js:196:14)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:15252) 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(). (rejection id: 1)
(node:15252) [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.
TCP/IP 历史与分层模型
===writing html...
===getting book HTML content
===write html file success
===writing markdown...
===write markdown file success
(node:15252) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at validateString (internal/validators.js:125:11)
at Object.resolve (path.js:161:7)
at mkdir (C:\Users\Lerix\AppData\Roaming\npm\node_modules@oliyg\juejinxiaoce\utils.js:7:26)
at Juejin.copyToPWDDir (C:\Users\Lerix\AppData\Roaming\npm\node_modules@oliyg\juejinxiaoce\app.js:26:5)
at juejin.getContentHTML (C:\Users\Lerix\AppData\Roaming\npm\node_modules@oliyg\juejinxiaoce\app.js:196:14)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:15252) 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(). (rejection id: 2)

报错了

===navagating to main page
===login...
===getting book section list
===getting book HTML content
TypeError: Cannot read property 'sectionId' of undefined
at Juejin.getContentHTML (/Users/jipengning/Desktop/learnWeb/juejinxiaoce/app.js:123:192)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.