Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set Chrome
- 1. Download chromium
- 2. new tab -> url = chrome://version/
- 3. copy Executable Path -> /usr/lib/chromium/chromium
- Set Puppeteer
- 1. Create Folder
- 2. พิมพ์ npm init -> all enter
- 3. npm i puppeteer
- Test script
- 1. create script prakard.js -> "https://pastebin.com/0UGsk2u0"
- 2. พิมพ์ node prakard.js
- 3. รอดูผลลัพธ์ ถ้า error มันจะมี link ให้กดไป github ครับ
- เพิ้มเติม
- api ของ puppet ค่อยข้างดีเลยครับ มีให้ใช้เยอะและอธิบายละเอียด
- https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions
- พี่สามารถหาตัวอย่าง code ได้จากใน github นะครับ ลองไล่ๆเล่นโปรเขคเค้าดู มีตัวอย่างเยอะครับ
- ขอให้สนุกครับ
Add Comment
Please, Sign In to add comment