? 掘金小冊 markdown 轉換器 將小冊轉為 md 離線閱讀

JS菌發表於2019-01-20

20190121001820.png

注意:本專案不提供賬號,需要輸入自己的賬號密碼,只有在自己的賬號購買了小冊,才能獲取到小冊內容


專案地址:掘金小冊 markdown 轉換器,歡迎 star 蟹蟹

購買過的掘金小冊,通過谷歌 pupeteer 自動爬取 html 文件,並將 html 文件轉換為 markdown 格式的檔案。

安裝方式

首先 clone 此專案:

git clone https://github.com/oliyg/juejinxiaoce.git

然後安裝依賴:

npm i

推薦使用 nrm 管理映象源,使用淘寶映象:nrm use taobao

手動下載 chromium:

chromium 官網下載

將 chromium 解壓縮,連同 chrome-win 資料夾一同放入專案根目錄中去

最後專案目錄如下:

20190120235001.png

使用方法

新建 .env 檔案到根目錄,並根據 .env.example 填寫掘金登入使用者名稱和密碼以及要爬取的小冊ID資訊:

20190120235150.png

小冊ID見 URL 連結:

20190120235353.png

.env 檔案修改完畢後執行 npm start 等待出現訊息 all done. enjoy. 完成轉換,效果如下:

20190121000703.png

20190121000715.png

免責

  • 該專案僅作為技術討論,學習和研究使用

隱私

  • 該專案不會儲存和傳送任何使用者隱私資料

License

The MIT License (MIT) Copyright (c) 2019 OliverYoung

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

相關文章