{"id":7516,"date":"2021-11-23T19:22:48","date_gmt":"2021-11-23T10:22:48","guid":{"rendered":"https:\/\/gunmagisgeek.com\/blog\/?p=7516"},"modified":"2021-11-24T10:39:34","modified_gmt":"2021-11-24T01:39:34","slug":"puppeteer%e3%81%a7%e6%99%ae%e6%ae%b5%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%84%e3%82%8bchrome%e3%82%92%e8%87%aa%e5%8b%95%e6%93%8d%e7%b8%a6%e3%81%99%e3%82%8b%e3%80%82","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/puppeteer\/7516","title":{"rendered":"puppeteer\u3067\u666e\u6bb5\u4f7f\u3063\u3066\u3044\u308bChrome\u3092\u81ea\u52d5\u64cd\u7e26\u3059\u308b\u3002"},"content":{"rendered":"\n<p>puppeteer\u3092\u4f7f\u3046\u3068\u304d\u306f\u3001\u5225\u9014\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fchromium\u3092\u64cd\u4f5c\u3059\u308b\u5834\u5408\u304c\u591a\u3044\u306e\u3067\u3059\u304c\u3001\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u306e\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u306a\u3069\u3092\u884c\u3046\u3068\u304d\u306f\u666e\u6bb5\u4f7f\u3063\u3066\u3044\u308bchrome\u3092\u64cd\u4f5c\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u305d\u306e\u3084\u308a\u65b9\u306e\u30e1\u30e2\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u203bChrome\u306e\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306e\u4f4d\u7f6e(\u30d1\u30b9)\u3084\u3001\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d1\u30b9\u306f\u74b0\u5883\u306b\u3088\u3063\u3066\u5909\u308f\u308b\u306e\u3067\u30d1\u30b9\u3092\u78ba\u8a8d\u3057\u3066\u30b3\u30fc\u30c9\u3092\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30ed\u30fc\u30ab\u30eb\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bchrome\u3092\u4f7f\u3046<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:js mark:7 decode:true \">const puppeteer = require('puppeteer-core');\n\n(async () =&gt; {\n\n    const browserSet = {\n        headless: false,\n        executablePath: 'C:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\Chrome.exe',\n    }\n\n    const browser = await puppeteer.launch(browserSet);\n    const page = await browser.newPage();\n\n    await page.goto(\"https:\/\/www.google.com\/\", {\n        waitUntil: 'load',\n    });\n\n})();<\/pre><\/div>\n\n\n\n<p id=\"block-c2e8ae2e-030e-407b-a3b6-60d3f2dcdad2\">executablePath\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30ed\u30fc\u30ab\u30eb\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bChrome\u306e\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u3057\u3001\u3053\u306e\u72b6\u614b\u3067\u306f\u30b2\u30b9\u30c8\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3059\u308b\u305f\u3081\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001userDataDir\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u7528\u3044\u3066\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u5148\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:js mark:8 decode:true \">const puppeteer = require('puppeteer-core');\n\n(async () =&gt; {\n\n    const browserSet = {\n        headless: false,\n        executablePath: 'C:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\Chrome.exe',\n        userDataDir: 'C:\\\\Users\\\\&lt;&lt;User Name&gt;&gt;\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data',\n    }\n\n    const browser = await puppeteer.launch(browserSet);\n    const page = await browser.newPage();\n\n\n    await page.goto(\"https:\/\/www.google.com\/\", {\n        waitUntil: 'load',\n    });\n\n})();\n<\/pre><\/div>\n\n\n\n<p>\u3053\u308c\u3067\u30e6\u30fc\u30b6\u30fc\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3093\u3060\u72b6\u614b\u306echrome\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u3057\u3001\u3053\u306e\u72b6\u614b\u3067\u5b9f\u884c\u3059\u308b\u306b\u306fchrome\u304c\u4ed6\u306b\u8d77\u52d5\u3057\u3066\u3044\u306a\u3044\u3053\u3068\u304c\u6761\u4ef6\u3067\u3001\u3059\u3067\u306bchrome\u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u300cError: Failed to launch the browser process!\u300d\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>puppeteer\u3092\u4f7f\u3046\u3068\u304d\u306f\u3001\u5225\u9014\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[87],"tags":[],"class_list":["post-7516","post","type-post","status-publish","format-standard","hentry","category-puppeteer"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/7516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/comments?post=7516"}],"version-history":[{"count":11,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/7516\/revisions"}],"predecessor-version":[{"id":7530,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/7516\/revisions\/7530"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=7516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=7516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=7516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}