{"id":1974,"date":"2021-01-10T22:50:33","date_gmt":"2021-01-10T13:50:33","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=1974"},"modified":"2022-05-08T23:20:48","modified_gmt":"2022-05-08T14:20:48","slug":"post-1974","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=1974","title":{"rendered":"GAS\u3068PhantomJsCloud\u3067\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0(Javascript\u30da\u30fc\u30b8\u306b\u5bfe\u5fdc)"},"content":{"rendered":"\n<p>\u901a\u5e38\u306eGoogle Apps Script(GAS)\u306e\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3067\u306f\u3001Javascript\u306b\u3088\u308b\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u306f\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u3057\u304b\u3057\u3001PhantomJsCloud\u306eAPI\u3092\u5229\u7528\u3059\u308c\u3070\u3001\u52d5\u7684\u306a\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001GAS\u3068PhantomJsCloud\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Google Apps Script\u306f\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u306b\u4fbf\u5229<\/h2>\n\n\n\n<p>Google Apps Script(GAS)\u306f\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u306b\u3068\u3066\u3082\u9069\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"PafDGIs0wZ\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=2460\">GAS\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u65b9\u6cd5\uff01Parser\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u305f\u624b\u9806\u3092\u89e3\u8aac<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;GAS\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u65b9\u6cd5\uff01Parser\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u305f\u624b\u9806\u3092\u89e3\u8aac&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=2460&#038;embed=true#?secret=OtFJ8uR1Hx#?secret=PafDGIs0wZ\" data-secret=\"PafDGIs0wZ\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u74b0\u5883\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u767b\u9332\u306b\u3088\u308b\u5b9a\u671f\u7684\u306a\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>GAS\u306f\u7121\u6599\u3067\u5229\u7528\u3067\u304d\u308b\u305f\u3081\u3001\u8cbb\u7528\uff10\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u74b0\u5883\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Javascript\u306e\u52d5\u7684\u30da\u30fc\u30b8\u306fGAS\u306b\u3088\u308b\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u304c\u96e3\u3057\u3044<\/h2>\n\n\n\n<p>\u305f\u3060\u3001Google Apps Script(GAS)\u3067\u306fJavascript\u3067\u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u308bWeb\u30da\u30fc\u30b8\u306e\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u304c\u96e3\u3057\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p>URL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066HTML\u30bd\u30fc\u30b9\u3092\u53d6\u5f97\u3057\u305f\u969b\u306b\u3001Javascript\u306e\u52d5\u7684\u30da\u30fc\u30b8\u3060\u3068\u30bd\u30fc\u30b9\u4e0a\u306b\u306f\u53d6\u5f97\u3057\u305f\u3044\u30c7\u30fc\u30bf\u306e\u8a18\u8ff0\u304c\u306a\u3044\u305f\u3081\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001Yahoo\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u5834\u5408\u3001Chrome\u30d6\u30e9\u30a6\u30b6\u3067\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u8868\u793a\u3057\u3066\u3082\u3001HTML\u30bd\u30fc\u30b9\u4e0a\u3067\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u6587\u5b57\u5217\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u30e4\u30d5\u30fc\u306e\u30da\u30fc\u30b8\u306fJavaScript\u3067\u8a18\u8ff0\u3055\u308c\u3066\u3044\u3066\u3001\u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001GAS\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6a5f\u80fd\u3084\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u3066\u3082\u3001\u52d5\u7684\u306a\u30da\u30fc\u30b8\u304b\u3089\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PhantomJsCloud\u306eAPI\u3067\u52d5\u7684\u30da\u30fc\u30b8\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u304c\u53ef\u80fd\u306b<\/h2>\n\n\n\n<p>Javascript\u3067\u8868\u73fe\u3055\u308c\u30af\u30e9\u30a4\u30a2\u30f3\u30c8PC\u3067\u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u308bWeb\u30da\u30fc\u30b8\u306b\u5bfe\u3057\u3001Google Apps Script(GAS)\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u65b9\u6cd5\u306f\u306a\u3044\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n\n\n\n<p>\u5b9f\u306f\u3001\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u3092GAS\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u65b9\u6cd5\u306f\u3001\u3042\u308b\u30b5\u30fc\u30d3\u30b9\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u5b9f\u73fe\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u308c\u306f\u3001PhantomJsCloud\u3068\u3044\u3046\u30b5\u30fc\u30d3\u30b9\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<p><a class=\"external\" href=\"https:\/\/phantomjscloud.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">PhantomJsCloud API Service<\/a><\/p>\n\n\n\n<p>PhantomJsCloud\u306f\u3001\u30d8\u30c3\u30c9\u30ec\u30b9\u30d6\u30e9\u30a6\u30b6\u306e\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u3067\u3001Javascript\u3092\u5b9f\u884c\u3057\u3066\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u305fHTML\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>PhantomJsCloud\u3067\u52d5\u7684\u306a\u30da\u30fc\u30b8\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0<\/li><li>GAS\u3067\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u7d50\u679c\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0<\/li><\/ol>\n\n\n\n<p>\u4e0a\u8a18\u306e\u624b\u9806\u3067PhantomJsCloud\u306eAPI\u3068GAS\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u52d5\u7684\u306a\u30da\u30fc\u30b8\u306e\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PhantomJsCloud\u3067\u52d5\u7684\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n\n\n\n<p>\u5b9f\u969b\u306bPhantomJsCloud\u306eAPI\u3092\u5229\u7528\u3057\u3066\u3001Javascript\u306e\u52d5\u7684Web\u30da\u30fc\u30b8\u3092Google Apps Script\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u65b9\u6cd5\u3092\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\uff11\uff0ePhantomJsCloud\u306eAPI\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u3001\u5229\u7528\u767b\u9332\u3068API\u306e\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u203bPhantomJsCloud\u306eAPI\u767a\u884c\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"ZDED5znjp2\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=1976\">\u52d5\u7684\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u53ef\u80fd\u306b\u3059\u308b\u300cPhantomJsCloud\u300d\u306eAPI\u30ad\u30fc\u767a\u884c\u65b9\u6cd5<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u52d5\u7684\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u53ef\u80fd\u306b\u3059\u308b\u300cPhantomJsCloud\u300d\u306eAPI\u30ad\u30fc\u767a\u884c\u65b9\u6cd5&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=1976&#038;embed=true#?secret=Pwgw2Hh93M#?secret=ZDED5znjp2\" data-secret=\"ZDED5znjp2\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff12\uff0eAPI\u30ad\u30fc\u3092\u767a\u884c\u3057\u305f\u3089\u3001GAS\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u306b\u5f93\u3063\u3066\u3001API\u30ad\u30fc\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>Key:<span style=\"font-size: 1.6rem;\">PHANTOMJSCLOUD_ID\u3001Value:(\u767a\u884c\u3057\u305fPhantomJsCloud\u306eAPI\u30ad\u30fc)<\/span><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"lChPlhTTzP\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=5608\">GAS\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf(\u65b0IDE)\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306eGUI\u8a2d\u5b9a\u304c\u5fa9\u6d3b\uff01<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;GAS\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf(\u65b0IDE)\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306eGUI\u8a2d\u5b9a\u304c\u5fa9\u6d3b\uff01&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=5608&#038;embed=true#?secret=j7hjBvEEZ8#?secret=lChPlhTTzP\" data-secret=\"lChPlhTTzP\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\uff13\uff0e\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u3067PhantomJsCloud\u3092\u5229\u7528\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function phantomJSCloudScraping(URL) {\n  \/\/\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u304b\u3089PhantomJsCloud\u306eAPI\u30ad\u30fc\u3092\u53d6\u5f97\u3059\u308b\n  let key = PropertiesService.getScriptProperties().getProperty('PHANTOMJSCLOUD_ID');\n  \/\/HTTPS\u30ec\u30b9\u30dd\u30f3\u30b9\u306b\u8a2d\u5b9a\u3059\u308b\u30da\u30a4\u30ed\u30fc\u30c9\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u9805\u76ee\u3092\u8a2d\u5b9a\u3059\u308b\n  let option =\n  {\n    url: URL,\n    renderType: \"HTML\",\n    outputAsJson: true\n  };\n  \/\/\u30aa\u30d7\u30b7\u30e7\u30f3\u9805\u76ee\u3092JSON\u306b\u3057\u3066\u30da\u30a4\u30ed\u30fc\u30c9\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3001\u30a8\u30f3\u30b3\u30fc\u30c9\u3059\u308b\n  let payload = JSON.stringify(option);\n  payload = encodeURIComponent(payload);\n  \/\/PhantomJsCloud\u306eAPI\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3046\u305f\u3081\u306eURL\u3092\u8a2d\u5b9a\n  let apiUrl = \"https:\/\/phantomjscloud.com\/api\/browser\/v2\/\" + key + \"\/?request=\" + payload;\n  \/\/\u8a2d\u5b9a\u3057\u305fAPI\u30ea\u30af\u30a8\u30b9\u30c8\u7528URL\u306b\u30d5\u30a7\u30c3\u30c1\u3057\u3066\u3001\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3002\n  let response = UrlFetchApp.fetch(apiUrl);\n  \/\/\u53d6\u5f97\u3057\u305fjson\u30c7\u30fc\u30bf\u3092\u914d\u5217\u30c7\u30fc\u30bf\u3068\u3057\u3066\u683c\u7d0d\n  let json = JSON.parse(response.getContentText());\n  \/\/API\u304b\u3089\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u304b\u3089JS\u304b\u3089\u751f\u6210\u3055\u308c\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\n  let source = json[\"content\"][\"data\"];\n  return source;\n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"616\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_001.jpg\" alt=\"Google Apps Script(GAS)\u3067PhantomJsCloud\u306eAPI\u3092\u4f7f\u3063\u3066Javascript\u306a\u3069\u3067\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u65b9\u6cd5\" class=\"wp-image-2491\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_001.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_001-300x154.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_001-768x394.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_001-1024x526.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_001-530x272.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_001-565x290.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_001-710x364.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_001-725x372.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306ephantomJSCloudScraping\u95a2\u6570\u306f\u3001PhantomJsCloud\u304b\u3089\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u306e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u305fHTML\u30bd\u30fc\u30b9\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u81ea\u4f5c\u95a2\u6570\u3067phantomJSCloudScraping\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u306e\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Yahoo\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u30b5\u30f3\u30d7\u30eb<\/h2>\n\n\n\n<p>\u5148\u7a0b\u7d39\u4ecb\u3057\u305fPhantomJsCloud\u306eAPI\u3092\u5229\u7528\u3059\u308b\u81ea\u4f5c\u95a2\u6570\u3092\u5229\u7528\u3057\u3066\u3001\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u3001Javascript\u3067\u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u308b\u30da\u30fc\u30b8\u4f8b\u3068\u3057\u3066\u3001Yahoo\u30c8\u30c3\u30d7\u30da\u30fc\u30b8(<a href=\"https:\/\/yahoo.co.jp\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/yahoo.co.jp<\/a>)\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3057\u3001\u30e4\u30d5\u30c8\u30d4\u306e\u8a18\u4e8b\u30bf\u30a4\u30c8\u30eb\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u203b\u30e4\u30d5\u30fc\u30c8\u30c3\u30d7\u306e\u30bd\u30fc\u30b9\u3092\u898b\u308b\u3068\u3001HTML\u306e\u60c5\u5831\u304c\u306a\u3044\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>Google Apps Script\u3067\u30e4\u30d5\u30fc\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306e\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3092\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function getYahooTopics() {\n  \/\/\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3057\u305f\u3044Web\u30da\u30fc\u30b8\u306eURL\u3092\u5909\u6570\u3067\u5b9a\u7fa9\u3059\u308b\n  let url = \"https:\/\/www.yahoo.co.jp\/\";\n  \/\/PhantomJsCloud\u7528\u306e\u72ec\u81ea\u95a2\u6570\u3067\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u306eHTML\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\n  let html = phantomJSCloudScraping(url);\n  \/\/Parser\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u6761\u4ef6\u3092\u6e80\u305f\u3057\u305fHTML\u8981\u7d20\u3092\u62bd\u51fa\u3059\u308b\n  let newsList = Parser.data(html)\n    .from(\"&lt;h1 class=\"\\\"_3cl937Zpn1ce8mDKd5kp7u\\\"\" > \")\n      .to(\"\")\n      .iterate();\n  \/\/\u30ed\u30b0\u51fa\u529b\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u7d50\u679c\u3092\u8868\u793a\u3059\u308b\n  console.log(newsList);\n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"502\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_002.jpg\" alt=\"Javascript\u3067\u52d5\u7684\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u308bYahooJapan\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308bGoogle Apps Script(GAS)\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" class=\"wp-image-2492\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_002.jpg 1000w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_002-300x151.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_002-768x386.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_002-530x266.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_002-565x284.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_002-710x356.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/01\/20210110_auto_002-725x364.jpg 725w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p>\u5b9f\u884c\u30ed\u30b0\u306e\u51fa\u529b\u7d50\u679c\u3067\u3001\u30e4\u30d5\u30c8\u30d4\u306e\u30cb\u30e5\u30fc\u30b9\u304c8\u672c\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3067\u304d\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306bPhantomJsCloud\u306b\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3057\u305f\u3044URL\u3092API\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u3053\u3068\u3067\u3001\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u3067\u3082GAS\u306b\u3088\u308b\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n\n\n\n<p>\u4eca\u56de\u3001Google Apps Script(GAS)\u3067\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u3092\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>GAS\u306f\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u306b\u4fbf\u5229\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3059\u304c\u3001\u30e4\u30d5\u30fc\u30c8\u30c3\u30d7\u306e\u3088\u3046\u306aJavascript\u3067\u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u308bWeb\u30da\u30fc\u30b8\u306e\u5834\u5408\u306b\u306f\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u304c\u96e3\u3057\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u3001PhantomJsCloud\u3068\u3044\u3046\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3057\u3001API\u3067\u52d5\u7684\u306a\u30da\u30fc\u30b8\u306eHTML\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u3067\u3001GAS\u306b\u3088\u308b\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6700\u8fd1\u306fJavascript\u3067\u69cb\u6210\u3055\u308c\u3001\u52d5\u7684\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u308bWeb\u30da\u30fc\u30b8\u304c\u5897\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3082\u3057\u3001\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3057\u305f\u3044\u30da\u30fc\u30b8\u304c\u52d5\u7684\u306aWeb\u30b5\u30a4\u30c8\u306e\u5834\u5408\u3001\u4eca\u56de\u7d39\u4ecb\u3057\u305f\u30e4\u30d5\u30fc\u30c8\u30c3\u30d7\u306e\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u65b9\u6cd5\u3092\u53c2\u8003\u306b\u3001\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u5e38\u306eGoogle Apps Script(GAS)\u306e\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3067\u306f\u3001Javascript\u306b\u3088\u308b\u52d5\u7684\u306aWeb\u30da\u30fc\u30b8\u306f\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3067\u304d\u307e\u305b\u3093\u3002 \u3057\u304b\u3057\u3001PhantomJsCloud\u306eAPI\u3092\u5229\u7528\u3059\u308c\u3070\u3001\u52d5\u7684\u306a\u30da\u30fc\u30b8\u3092 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2491,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2],"tags":[14,473,474,539],"class_list":["post-1974","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-gas","tag-gas","tag-phantomjscloud","tag-474","tag-539"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1974"}],"version-history":[{"count":6,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1974\/revisions"}],"predecessor-version":[{"id":5820,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1974\/revisions\/5820"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/2491"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}