Created
January 15, 2023 13:33
-
-
Save takahashim/d505c3c8984423fdfe537d2035863230 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import puppeteer from 'puppeteer'; | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
await page.goto('https://www.kdpcommunity.com/s/announcement-archive?language=ja', { waitUntil: 'networkidle0' }); | |
const src = await page.content(); | |
console.log(src); | |
await browser.close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "kindle_scraping", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"type": "module", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"puppeteer": "^19.5.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
上記スクリプトの使い方:
npm install
を実行するnode index.js
を実行する