Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.idea
/node_modules
/out
package-lock.json
16 changes: 14 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,22 @@ class GitbookPrinter {
async _downloadChapterList() {

/* Open browser. */
const browser = await puppeteer.launch();
const browser = await puppeteer.launch(
{
ignoreHTTPSErrors: true,
args :[
'--ignore-certificate-errors',
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--lang=ja,en-US;q=0.9,en;q=0.8',
'--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'
]
});

const page = await browser.newPage();

await page.setDefaultNavigationTimeout(0);

/* Get chapters list from summary. */
const chapterPathList = await this._getChapterPathList();

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
},
"dependencies": {
"add-zero": "^1.0.0",
"commander": "^2.15.1",
"commander": "^2.20.3",
"easy-pdf-merge": "^0.1.3",
"puppeteer": "^1.4.0",
"rimraf": "^2.6.2"
"puppeteer": "^1.20.0",
"rimraf": "^2.7.1"
},
"devDependencies": {
"standard-version": "^4.4.0"
Expand Down