{"id":121297,"date":"2025-12-04T16:20:03","date_gmt":"2025-12-04T09:20:03","guid":{"rendered":"https:\/\/tino.vn\/blog\/?p=121297"},"modified":"2025-12-04T16:22:55","modified_gmt":"2025-12-04T09:22:55","slug":"cach-su-dung-n8n-va-puppeteer","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/cach-su-dung-n8n-va-puppeteer\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00e1ch s\u1eed d\u1ee5ng n8n v\u00e0 Puppeteer chi ti\u1ebft A-Z"},"content":{"rendered":"\n<p><strong>Trong k\u1ef7 nguy\u00ean d\u1eef li\u1ec7u, nhu c\u1ea7u thu th\u1eadp th\u00f4ng tin v\u00e0 t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00e1c t\u00e1c v\u1ee5 tr\u00ean tr\u00ecnh duy\u1ec7t ng\u00e0y c\u00e0ng tr\u1edf n\u00ean c\u1ea5p thi\u1ebft. Tuy nhi\u00ean, c\u00e1c ph\u01b0\u01a1ng ph\u00e1p g\u1eedi HTTP Request truy\u1ec1n th\u1ed1ng th\u01b0\u1eddng g\u1eb7p kh\u00f3 kh\u0103n khi \u0111\u1ed1i m\u1eb7t v\u1edbi nh\u1eefng trang web s\u1eed d\u1ee5ng nhi\u1ec1u JavaScript ho\u1eb7c y\u00eau c\u1ea7u t\u01b0\u01a1ng t\u00e1c ph\u1ee9c t\u1ea1p nh\u01b0 \u0111\u0103ng nh\u1eadp v\u00e0 \u0111i\u1ec1n bi\u1ec3u m\u1eabu. S\u1ef1 k\u1ebft h\u1ee3p gi\u1eefa <a href=\"https:\/\/tino.vn\/blog\/n8n-la-gi\/\" target=\"_blank\" data-type=\"post\" data-id=\"104774\" rel=\"noreferrer noopener\">n8n<\/a> v\u00e0 Puppeteer ch\u00ednh l\u00e0 ch\u00eca kh\u00f3a \u0111\u1ec3 gi\u1ea3i quy\u1ebft tri\u1ec7t \u0111\u1ec3 th\u00e1ch th\u1ee9c n\u00e0y. B\u00e0i vi\u1ebft d\u01b0\u1edbi \u0111\u00e2y s\u1ebd h\u01b0\u1edbng d\u1eabn b\u1ea1n c\u00e1ch s\u1eed d\u1ee5ng n8n v\u00e0 Puppeteer chi ti\u1ebft A-Z.<\/strong><\/p>\n\n\n\n<h2 id=\"T\u1ed5ng_quan_v\u1ec1_Puppeteer\">T\u1ed5ng quan v\u1ec1 Puppeteer<\/h2>\n\n\n\n<h3 id=\"Puppeteer_l\u00e0_g\u00ec?\"><a id=\"post-121297-_cuoou7cwpy0z\"><\/a><strong>Puppeteer l\u00e0 g\u00ec?<\/strong><\/h3>\n\n\n\n<p><a href=\"https:\/\/pptr.dev\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/pptr.dev\/\" rel=\"noreferrer noopener nofollow\">Puppeteer<\/a> l\u00e0 m\u1ed9t th\u01b0 vi\u1ec7n Node.js m\u1ea1nh m\u1ebd \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n b\u1edfi \u0111\u1ed9i ng\u0169 Google, cung c\u1ea5p m\u1ed9t API c\u1ea5p cao \u0111\u1ec3 \u0111i\u1ec1u khi\u1ec3n tr\u00ecnh duy\u1ec7t Chrome ho\u1eb7c Chromium th\u00f4ng qua giao th\u1ee9c DevTools. C\u00f4ng c\u1ee5 n\u00e0y ho\u1ea1t \u0111\u1ed9ng ch\u1ee7 y\u1ebfu \u1edf ch\u1ebf \u0111\u1ed9 &#8220;headless&#8221; (kh\u00f4ng giao di\u1ec7n ng\u01b0\u1eddi d\u00f9ng), cho ph\u00e9p th\u1ef1c thi t\u1ef1 \u0111\u1ed9ng c\u00e1c t\u00e1c v\u1ee5 web m\u00e0 kh\u00f4ng c\u1ea7n hi\u1ec3n th\u1ecb c\u1eeda s\u1ed5 tr\u00ecnh duy\u1ec7t th\u1ef1c t\u1ebf tr\u00ean m\u00e0n h\u00ecnh.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/cach-su-dung-n8n-va-puppeteer-1.png\" alt=\"Puppeteer l\u00e0 g\u00ec?\" class=\"wp-image-121311\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/cach-su-dung-n8n-va-puppeteer-1.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/cach-su-dung-n8n-va-puppeteer-1-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>Puppeteer l\u00e0 g\u00ec?<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>Nh\u1edd kh\u1ea3 n\u0103ng t\u01b0\u01a1ng t\u00e1c s\u00e2u v\u00e0o c\u1ea5u tr\u00fac trang web, Puppeteer tr\u1edf th\u00e0nh gi\u1ea3i ph\u00e1p ti\u00eau chu\u1ea9n \u0111\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c c\u00f4ng vi\u1ec7c nh\u01b0 thu th\u1eadp d\u1eef li\u1ec7u (crawling), ch\u1ee5p \u1ea3nh m\u00e0n h\u00ecnh, t\u1ea1o file PDF t\u1eeb trang web ho\u1eb7c t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00e1c thao t\u00e1c ki\u1ec3m th\u1eed giao di\u1ec7n ph\u1ee9c t\u1ea1p v\u1edbi \u0111\u1ed9 ch\u00ednh x\u00e1c v\u00e0 hi\u1ec7u su\u1ea5t cao.<\/p>\n\n\n\n<h3 id=\"T\u1ea1i_sao_n\u00ean_k\u1ebft_h\u1ee3p_n8n_v\u00e0_Puppeteer_trong_t\u1ef1_\u0111\u1ed9ng_h\u00f3a?\"><a id=\"post-121297-_x0a7cpnyw43j\"><\/a><strong>T\u1ea1i sao n\u00ean k\u1ebft h\u1ee3p n8n v\u00e0 Puppeteer trong t\u1ef1 \u0111\u1ed9ng h\u00f3a?<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>V\u01b0\u1ee3t qua r\u00e0o c\u1ea3n c\u1ee7a website \u0111\u1ed9ng:<\/strong> C\u00e1c node HTTP Request m\u1eb7c \u0111\u1ecbnh trong n8n ch\u1ec9 t\u1ea3i \u0111\u01b0\u1ee3c m\u00e3 ngu\u1ed3n HTML t\u0129nh v\u00e0 th\u01b0\u1eddng b\u1ea5t l\u1ef1c tr\u01b0\u1edbc c\u00e1c trang web Single Page Application (SPA) vi\u1ebft b\u1eb1ng React, Vue hay Angular. Puppeteer gi\u1ea3i quy\u1ebft tri\u1ec7t \u0111\u1ec3 v\u1ea5n \u0111\u1ec1 n\u00e0y b\u1eb1ng c\u00e1ch \u0111\u00f3ng vai tr\u00f2 nh\u01b0 m\u1ed9t tr\u00ecnh duy\u1ec7t th\u1ef1c th\u1ee5, cho ph\u00e9p render to\u00e0n b\u1ed9 JavaScript v\u00e0 t\u1ea3i \u0111\u1ea7y \u0111\u1ee7 n\u1ed9i dung tr\u01b0\u1edbc khi tr\u00edch xu\u1ea5t d\u1eef li\u1ec7u.<\/li>\n\n\n\n<li><strong>Th\u1ef1c hi\u1ec7n c\u00e1c t\u01b0\u01a1ng t\u00e1c ng\u01b0\u1eddi d\u00f9ng ph\u1ee9c t\u1ea1p:<\/strong> Nhi\u1ec1u quy tr\u00ecnh nghi\u1ec7p v\u1ee5 y\u00eau c\u1ea7u nhi\u1ec1u h\u01a1n vi\u1ec7c ch\u1ec9 l\u1ea5y d\u1eef li\u1ec7u, v\u00ed d\u1ee5 nh\u01b0 t\u1ef1 \u0111\u1ed9ng \u0111i\u1ec1n bi\u1ec3u m\u1eabu, cu\u1ed9n trang \u0111\u1ec3 t\u1ea3i th\u00eam n\u1ed9i dung, x\u1eed l\u00fd \u0111\u0103ng nh\u1eadp c\u00f3 x\u00e1c th\u1ef1c ho\u1eb7c click v\u00e0o c\u00e1c n\u00fat c\u1ee5 th\u1ec3. Puppeteer cung c\u1ea5p kh\u1ea3 n\u0103ng \u0111i\u1ec1u khi\u1ec3n chi ti\u1ebft t\u1eebng h\u00e0nh vi chu\u1ed9t v\u00e0 b\u00e0n ph\u00edm, gi\u00fap n8n th\u1ef1c thi c\u00e1c k\u1ecbch b\u1ea3n m\u00f4 ph\u1ecfng h\u00e0nh vi con ng\u01b0\u1eddi m\u1ed9t c\u00e1ch m\u01b0\u1ee3t m\u00e0.<\/li>\n\n\n\n<li><strong>Tr\u1ef1c quan h\u00f3a lu\u1ed3ng d\u1eef li\u1ec7u v\u00e0 x\u1eed l\u00fd logic:<\/strong> Thay v\u00ec ph\u1ea3i vi\u1ebft h\u00e0ng tr\u0103m d\u00f2ng m\u00e3 \u0111\u1ec3 qu\u1ea3n l\u00fd lu\u1ed3ng d\u1eef li\u1ec7u, x\u1eed l\u00fd l\u1ed7i hay l\u1eadp l\u1ecbch ch\u1ea1y, n8n cung c\u1ea5p giao di\u1ec7n k\u00e9o th\u1ea3 tr\u1ef1c quan \u0111\u1ec3 qu\u1ea3n l\u00fd c\u00e1c t\u00e1c v\u1ee5 n\u00e0y. Ng\u01b0\u1eddi d\u00f9ng ch\u1ec9 c\u1ea7n s\u1eed d\u1ee5ng Puppeteer cho ph\u1ea7n x\u1eed l\u00fd tr\u00ecnh duy\u1ec7t, sau \u0111\u00f3 chuy\u1ec3n giao d\u1eef li\u1ec7u thu \u0111\u01b0\u1ee3c cho n8n \u0111\u1ec3 ti\u1ebfp t\u1ee5c c\u00e1c b\u01b0\u1edbc nh\u01b0 l\u1ecdc th\u00f4ng tin, l\u01b0u v\u00e0o Google Sheets, g\u1eedi th\u00f4ng b\u00e1o qua Telegram ho\u1eb7c k\u1ebft n\u1ed1i v\u1edbi h\u00e0ng ng\u00e0n \u1ee9ng d\u1ee5ng kh\u00e1c.<\/li>\n\n\n\n<li><strong>T\u1ed1i \u01b0u h\u00f3a kh\u1ea3 n\u0103ng Bypass Anti-bot:<\/strong> C\u00e1c website hi\u1ec7n \u0111\u1ea1i th\u01b0\u1eddng c\u00f3 c\u01a1 ch\u1ebf ph\u00e1t hi\u1ec7n bot d\u1ef1a tr\u00ean User-Agent ho\u1eb7c d\u1ea5u v\u00e2n tay tr\u00ecnh duy\u1ec7t (browser fingerprint). Khi s\u1eed d\u1ee5ng Puppeteer k\u1ebft h\u1ee3p v\u1edbi c\u00e1c plugin h\u1ed7 tr\u1ee3 (nh\u01b0 <strong>puppeteer-extra-plugin-stealth<\/strong>), h\u1ec7 th\u1ed1ng c\u00f3 th\u1ec3 gi\u1ea3 l\u1eadp c\u00e1c th\u00f4ng s\u1ed1 gi\u1ed1ng h\u1ec7t ng\u01b0\u1eddi d\u00f9ng th\u1eadt, gi\u00fap gi\u1ea3m thi\u1ec3u r\u1ee7i ro b\u1ecb ch\u1eb7n IP ho\u1eb7c b\u1ecb y\u00eau c\u1ea7u nh\u1eadp CAPTCHA trong qu\u00e1 tr\u00ecnh v\u1eadn h\u00e0nh t\u1ef1 \u0111\u1ed9ng.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/cach-su-dung-n8n-va-puppeteer-2.png\" alt=\"T\u1ea1i sao n\u00ean k\u1ebft h\u1ee3p n8n v\u00e0 Puppeteer trong t\u1ef1 \u0111\u1ed9ng h\u00f3a?\" class=\"wp-image-121312\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/cach-su-dung-n8n-va-puppeteer-2.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/cach-su-dung-n8n-va-puppeteer-2-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong><strong>T\u1ea1i sao n\u00ean k\u1ebft h\u1ee3p n8n v\u00e0 Puppeteer trong t\u1ef1 \u0111\u1ed9ng h\u00f3a?<\/strong><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h2 id=\"H\u01b0\u1edbng_d\u1eabn_c\u00e1ch_s\u1eed_d\u1ee5ng_n8n_v\u00e0_Puppeteer\"><a id=\"post-121297-_pjfvdgbhiwej\"><\/a>H\u01b0\u1edbng d\u1eabn c\u00e1ch s\u1eed d\u1ee5ng n8n v\u00e0 Puppeteer<\/h2>\n\n\n\n<h3 id=\"C\u00e0i_\u0111\u1eb7t_Community_Node_Puppeteer\"><a id=\"post-121297-_igluxjgslf19\"><\/a><strong>C\u00e0i \u0111\u1eb7t Community Node Puppeteer<\/strong><\/h3>\n\n\n\n<p>Thay v\u00ec vi\u1ebft code th\u1ee7 c\u00f4ng, c\u1ed9ng \u0111\u1ed3ng n8n \u0111\u00e3 ph\u00e1t tri\u1ec3n s\u1eb5n node chuy\u00ean d\u1ee5ng cho Puppeteer gi\u00fap thao t\u00e1c k\u00e9o th\u1ea3 d\u1ec5 d\u00e0ng h\u01a1n.<\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 1: <\/strong>T\u1ea1i giao di\u1ec7n n8n, truy c\u1eadp menu <strong>Settings<\/strong> (C\u00e0i \u0111\u1eb7t).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"779\" height=\"405\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-1.png\" alt=\"C\u00e0i \u0111\u1eb7t Community Node Puppeteer\" class=\"wp-image-121298\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-1.png 779w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-1-300x156.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-1-768x399.png 768w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t Community Node Puppeteer<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 2: <\/strong>Ch\u1ecdn m\u1ee5c <strong>Community Nodes<\/strong> r\u1ed3i nh\u1ea5n n\u00fat <strong>Install<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1341\" height=\"607\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2.png\" alt=\"C\u00e0i \u0111\u1eb7t Community Node Puppeteer\" class=\"wp-image-121299\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2.png 1341w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2-300x136.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2-1024x464.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2-768x348.png 768w\" sizes=\"(max-width: 1341px) 100vw, 1341px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t Community Node Puppeteer<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 3: <\/strong>Nh\u1eadp t\u00ean g\u00f3i: <strong>n8n-nodes-puppeteer<\/strong>.<\/p>\n\n\n\n<p>\u0110\u00e1nh d\u1ea5u \u0111\u1ed3ng \u00fd v\u1edbi c\u00e1c \u0111i\u1ec1u kho\u1ea3n r\u1ee7i ro v\u00e0 nh\u1ea5n <strong>Install<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"907\" height=\"512\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-3.png\" alt=\"C\u00e0i \u0111\u1eb7t Community Node Puppeteer\" class=\"wp-image-121300\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-3.png 907w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-3-300x169.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-3-768x434.png 768w\" sizes=\"(max-width: 907px) 100vw, 907px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t Community Node Puppeteer<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Sau khi qu\u00e1 tr\u00ecnh c\u00e0i \u0111\u1eb7t ho\u00e0n t\u1ea5t, ng\u01b0\u1eddi d\u00f9ng s\u1ebd th\u1ea5y node <strong>Puppeteer<\/strong> xu\u1ea5t hi\u1ec7n trong danh s\u00e1ch c\u00f4ng c\u1ee5.<\/p>\n\n\n\n<h3 id=\"X\u00e2y_d\u1ef1ng_workflow_m\u1eabu_\"><a id=\"post-121297-_2ybl6zver27q\"><\/a><strong>X\u00e2y d\u1ef1ng workflow m\u1eabu <\/strong><\/h3>\n\n\n\n<p>Ch\u00fang ta s\u1ebd th\u1ef1c hi\u1ec7n m\u1ed9t v\u00ed d\u1ee5 \u0111\u01a1n gi\u1ea3n: <em>Truy c\u1eadp v\u00e0o trang ch\u1ee7 Google v\u00e0 ch\u1ee5p m\u00e0n h\u00ecnh (Screenshot).<\/em><\/p>\n\n\n\n<h4 id=\"B\u01b0\u1edbc_1:_T\u1ea1o_Trigger\"><a id=\"post-121297-_hi9hh451ta4g\"><\/a>B\u01b0\u1edbc 1: T\u1ea1o Trigger<\/h4>\n\n\n\n<p><\/p>\n\n\n\n<p>K\u00e9o node <strong>Trigger<\/strong> <strong>Manual <\/strong>(ho\u1eb7c &#8220;On clicking &#8216;Execute'&#8221;) v\u00e0o khung l\u00e0m vi\u1ec7c. Node n\u00e0y \u0111\u00f3ng vai tr\u00f2 n\u00fat kh\u1edfi \u0111\u1ed9ng th\u1ee7 c\u00f4ng \u0111\u1ec3 ki\u1ec3m tra quy tr\u00ecnh.<\/p>\n\n\n\n<h4 id=\"B\u01b0\u1edbc_2:_C\u1ea5u_h\u00ecnh_node_Puppeteer_&#8211;_M\u1edf_tr\u00ecnh_duy\u1ec7t\"><a id=\"post-121297-_o7mj80tdna4q\"><\/a>B\u01b0\u1edbc 2: C\u1ea5u h\u00ecnh node Puppeteer &#8211; M\u1edf tr\u00ecnh duy\u1ec7t<\/h4>\n\n\n\n<p><\/p>\n\n\n\n<p>T\u00ecm v\u00e0 k\u00e9o node <strong>Puppeteer<\/strong> n\u1ed1i v\u00e0o sau Trigger (ch\u1ecdn <strong>Get Screenshot<\/strong>)<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1067\" height=\"619\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4.png\" alt=\"C\u1ea5u h\u00ecnh node Puppeteer\" class=\"wp-image-121301\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4.png 1067w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4-300x174.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4-1024x594.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4-768x446.png 768w\" sizes=\"(max-width: 1067px) 100vw, 1067px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u1ea5u h\u00ecnh node Puppeteer<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Trong b\u1ea3ng c\u1ea5u h\u00ecnh, thi\u1ebft l\u1eadp nh\u01b0 sau:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Operation:<\/strong> Gi\u1eef nguy\u00ean <strong>Get Screenshot<\/strong><\/li>\n\n\n\n<li><strong>URL:<\/strong> Nh\u1eadp <a href=\"https:\/\/www.google.com\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/www.google.com<\/a>.<\/li>\n\n\n\n<li><strong>Property Name:<\/strong> Data<\/li>\n\n\n\n<li><strong>Type:<\/strong> PNG (ho\u1eb7c JEPG).<\/li>\n\n\n\n<li><strong>Full Page:<\/strong><\/li>\n\n\n\n<li><strong>N\u1ebfu ch\u1ecdn True:<\/strong> H\u1ec7 th\u1ed1ng s\u1ebd cu\u1ed9n v\u00e0 ch\u1ee5p to\u00e0n b\u1ed9 chi\u1ec1u d\u00e0i trang web (th\u00edch h\u1ee3p v\u1edbi c\u00e1c trang b\u00e1o ch\u00ed d\u00e0i).<\/li>\n\n\n\n<li><strong>N\u1ebfu ch\u1ecdn False: <\/strong>H\u1ec7 th\u1ed1ng ch\u1ec9 ch\u1ee5p ph\u1ea7n m\u00e0n h\u00ecnh hi\u1ec3n th\u1ecb \u0111\u1ea7u ti\u00ean.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"641\" height=\"608\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-5.png\" alt=\"C\u1ea5u h\u00ecnh node Puppeteer\" class=\"wp-image-121302\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-5.png 641w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-5-300x285.png 300w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u1ea5u h\u00ecnh node Puppeteer<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 id=\"B\u01b0\u1edbc_3:_Th\u1ef1c_thi_v\u00e0_ki\u1ec3m_tra_(Execution)\">B\u01b0\u1edbc 3: Th\u1ef1c thi v\u00e0 ki\u1ec3m tra (Execution)<\/h4>\n\n\n\n<p><\/p>\n\n\n\n<p>Nh\u1ea5n n\u00fat <strong>Execute step<\/strong> v\u00e0 quan s\u00e1t k\u1ebft qu\u1ea3 \u0111\u1ea7u ra \u1edf khung <strong>Output<\/strong> b\u00ean ph\u1ea3i.<\/p>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">L\u01b0u \u00fd:<\/span><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>M\u1eb7c \u0111\u1ecbnh n8n th\u01b0\u1eddng \u0111\u1ec3 ch\u1ebf \u0111\u1ed9 xem l\u00e0 <strong>JSON<\/strong>. V\u1edbi thao t\u00e1c ch\u1ee5p \u1ea3nh, v\u00f9ng n\u00e0y s\u1ebd tr\u1ed1ng ho\u1eb7c ch\u1ec9 hi\u1ec7n th\u00f4ng tin meta.<\/li>\n\n\n\n<li>B\u1ea1n c\u1ea7n b\u1ea5m v\u00e0o tab <strong>Binary<\/strong> (n\u1eb1m c\u1ea1nh tab JSON \u1edf g\u00f3c tr\u00ean v\u00f9ng Output).<\/li>\n\n\n\n<li>T\u1ea1i \u0111\u00e2y, b\u1ea1n s\u1ebd th\u1ea5y m\u1ed9t file h\u00ecnh \u1ea3nh hi\u1ec7n ra. H\u00e3y b\u1ea5m v\u00e0o <strong>View<\/strong> ho\u1eb7c bi\u1ec3u t\u01b0\u1ee3ng con m\u1eaft \u0111\u1ec3 xem tr\u1ef1c ti\u1ebfp b\u1ee9c \u1ea3nh m\u00e0 Puppeteer v\u1eeba ch\u1ee5p \u0111\u01b0\u1ee3c.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"878\" height=\"509\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-6.png\" alt=\"Th\u1ef1c thi v\u00e0 ki\u1ec3m tra \" class=\"wp-image-121303\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-6.png 878w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-6-300x174.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-6-768x445.png 768w\" sizes=\"(max-width: 878px) 100vw, 878px\" \/><figcaption class=\"wp-element-caption\"><strong>Th\u1ef1c thi v\u00e0 ki\u1ec3m tra <\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"887\" height=\"547\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-7.png\" alt=\"Th\u1ef1c thi v\u00e0 ki\u1ec3m tra\" class=\"wp-image-121304\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-7.png 887w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-7-300x185.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-7-768x474.png 768w\" sizes=\"(max-width: 887px) 100vw, 887px\" \/><figcaption class=\"wp-element-caption\"><strong>Th\u1ef1c thi v\u00e0 ki\u1ec3m tra<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 id=\"C\u00e1ch_kh\u1eafc_ph\u1ee5c_l\u1ed7i_m\u00f4i_tr\u01b0\u1eddng_cho_node_Puppeteer_tr\u00ean_Docker\"><a id=\"post-121297-_otxfh9x8v3na\"><\/a><strong>C\u00e1ch kh\u1eafc ph\u1ee5c l\u1ed7i m\u00f4i tr\u01b0\u1eddng cho node Puppeteer tr\u00ean Docker<\/strong><\/h3>\n\n\n\n<p><strong>M\u00f4 t\u1ea3 l\u1ed7i:<\/strong> Khi th\u1ef1c thi Node Puppeteer l\u1ea7n \u0111\u1ea7u tr\u00ean n8n ch\u1ea1y b\u1eb1ng Docker, ng\u01b0\u1eddi qu\u1ea3n tr\u1ecb th\u01b0\u1eddng g\u1eb7p hai th\u00f4ng b\u00e1o l\u1ed7i ph\u1ed5 bi\u1ebfn sau:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Could not find Chrome: <\/strong>H\u1ec7 th\u1ed1ng kh\u00f4ng t\u00ecm th\u1ea5y tr\u00ecnh duy\u1ec7t.<\/li>\n\n\n\n<li><strong>Error loading shared library (libnss3.so, libatk&#8230;): <\/strong>Thi\u1ebfu c\u00e1c th\u01b0 vi\u1ec7n h\u1ec7 th\u1ed1ng c\u1ea7n thi\u1ebft \u0111\u1ec3 kh\u1edfi ch\u1ea1y tr\u00ecnh duy\u1ec7t.<\/li>\n\n\n\n<li><strong>Operation not permitted:<\/strong> L\u1ed7i xung \u0111\u1ed9t quy\u1ec1n h\u1ea1n Sandbox c\u1ee7a Chrome v\u00e0 Docker.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"879\" height=\"601\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-8.png\" alt=\"C\u00e1ch kh\u1eafc ph\u1ee5c l\u1ed7i m\u00f4i tr\u01b0\u1eddng cho node Puppeteer tr\u00ean Docker\" class=\"wp-image-121305\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-8.png 879w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-8-300x205.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-8-768x525.png 768w\" sizes=\"(max-width: 879px) 100vw, 879px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch kh\u1eafc ph\u1ee5c l\u1ed7i m\u00f4i tr\u01b0\u1eddng cho node Puppeteer tr\u00ean Docker<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>Nguy\u00ean nh\u00e2n:<\/strong> Image Docker m\u1eb7c \u0111\u1ecbnh c\u1ee7a n8n s\u1eed d\u1ee5ng h\u1ec7 \u0111i\u1ec1u h\u00e0nh Alpine Linux r\u00fat g\u1ecdn nh\u1eb1m t\u1ed1i \u01b0u dung l\u01b0\u1ee3ng, do \u0111\u00f3 kh\u00f4ng bao g\u1ed3m tr\u00ecnh duy\u1ec7t Chrome v\u00e0 c\u00e1c g\u00f3i th\u01b0 vi\u1ec7n \u0111\u1ed3 h\u1ecda \u0111i k\u00e8m.<\/p>\n\n\n\n<p>\u0110\u1ec3 kh\u1eafc ph\u1ee5c, ch\u00fang ta s\u1ebd c\u00e0i \u0111\u1eb7t tr\u00ecnh duy\u1ec7t <strong>Chromium<\/strong> phi\u00ean b\u1ea3n g\u1ed1c (Native) d\u00e0nh ri\u00eang cho Alpine Linux thay v\u00ec c\u1ed1 g\u1eafng c\u00e0i b\u1ea3n Chrome th\u00f4ng th\u01b0\u1eddng.<\/p>\n\n\n\n<h4 id=\"B\u01b0\u1edbc_1:_C\u00e0i_\u0111\u1eb7t_Chromium_v\u00e0_th\u01b0_vi\u1ec7n_ph\u1ee5_thu\u1ed9c\"><a id=\"post-121297-_lstke01f2ldy\"><\/a>B\u01b0\u1edbc 1: C\u00e0i \u0111\u1eb7t Chromium v\u00e0 th\u01b0 vi\u1ec7n ph\u1ee5 thu\u1ed9c<\/h4>\n\n\n\n<p><\/p>\n\n\n\n<p>Thay v\u00ec c\u00e0i \u0111\u1eb7t th\u1ee7 c\u00f4ng t\u1eebng g\u00f3i, h\u00e3y s\u1eed d\u1ee5ng tr\u00ecnh qu\u1ea3n l\u00fd g\u00f3i apk \u0111\u1ec3 c\u00e0i \u0111\u1eb7t to\u00e0n b\u1ed9 &#8220;combo&#8221; c\u1ea7n thi\u1ebft (Tr\u00ecnh duy\u1ec7t + Font ch\u1eef + Th\u01b0 vi\u1ec7n).<\/p>\n\n\n\n<p>Truy c\u1eadp v\u00e0o VPS qua SSH v\u00e0 ch\u1ea1y c\u00e1c c\u00e2u l\u1ec7nh sau:<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">T\u00ecm t\u00ean c\u1ee7a container n8n:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker ps<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"802\" height=\"493\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-9.png\" alt=\"C\u00e0i \u0111\u1eb7t Chromium v\u00e0 th\u01b0 vi\u1ec7n ph\u1ee5 thu\u1ed9c\" class=\"wp-image-121306\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-9.png 802w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-9-300x184.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-9-768x472.png 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t Chromium v\u00e0 th\u01b0 vi\u1ec7n ph\u1ee5 thu\u1ed9c<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">Ch\u1ea1y l\u1ec7nh c\u00e0i \u0111\u1eb7t Chrome b\u00ean trong container \u0111\u00f3:<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec -it -u root &#91;T\u00caN_CONTAINER_C\u1ee6A_B\u1ea0N] apk add --no-cache chromium nss freetype harfbuzz ca-certificates ttf-freefont<\/code><\/pre>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">L\u01b0u \u00fd:<\/span><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Thay <strong>[T\u00caN_CONTAINER_C\u1ee6A_B\u1ea0N]<\/strong> b\u1eb1ng t\u00ean th\u1ef1c t\u1ebf \u0111\u00e3 t\u00ecm \u0111\u01b0\u1ee3c b\u1eb1ng l\u1ec7nh \u1edf tr\u00ean (v\u00ed d\u1ee5: <strong>root_n8n_1<\/strong> ho\u1eb7c<strong> n8n_1<\/strong>).<\/li>\n\n\n\n<li>L\u1ec7nh n\u00e0y th\u1ef1c hi\u1ec7n d\u01b0\u1edbi quy\u1ec1n <strong>root<\/strong> \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o quy\u1ec1n ghi v\u00e0o th\u01b0 m\u1ee5c h\u1ec7 th\u1ed1ng.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1060\" height=\"485\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-10.png\" alt=\"C\u00e0i \u0111\u1eb7t Chromium v\u00e0 th\u01b0 vi\u1ec7n ph\u1ee5 thu\u1ed9c\" class=\"wp-image-121307\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-10.png 1060w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-10-300x137.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-10-1024x469.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-10-768x351.png 768w\" sizes=\"(max-width: 1060px) 100vw, 1060px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t Chromium v\u00e0 th\u01b0 vi\u1ec7n ph\u1ee5 thu\u1ed9c<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 id=\"B\u01b0\u1edbc_2:_C\u1ea5u_h\u00ecnh_\u0111\u01b0\u1eddng_d\u1eabn_(Executable_Path)_trong_n8n\"><a id=\"post-121297-_418pf89aky83\"><\/a>B\u01b0\u1edbc 2: C\u1ea5u h\u00ecnh \u0111\u01b0\u1eddng d\u1eabn (Executable Path) trong n8n<\/h4>\n\n\n\n<p><\/p>\n\n\n\n<p>Sau khi c\u00e0i \u0111\u1eb7t xong, n8n c\u1ea7n bi\u1ebft ch\u00ednh x\u00e1c v\u1ecb tr\u00ed c\u1ee7a tr\u00ecnh duy\u1ec7t m\u1edbi.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>M\u1edf node <strong>Puppeteer<\/strong> trong giao di\u1ec7n n8n.<\/li>\n\n\n\n<li>K\u00e9o xu\u1ed1ng ph\u1ea7n <strong>Options<\/strong>, ch\u1ecdn <strong>Add Option<\/strong>.<\/li>\n\n\n\n<li>Ch\u1ecdn m\u1ee5c <strong>Executable Path<\/strong>.<\/li>\n\n\n\n<li>Nh\u1eadp \u0111\u01b0\u1eddng d\u1eabn tuy\u1ec7t \u0111\u1ed1i: <code>\/usr\/bin\/chromium-browser<\/code><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"585\" height=\"481\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-11.png\" alt=\"C\u1ea5u h\u00ecnh \u0111\u01b0\u1eddng d\u1eabn (Executable Path) trong n8n\" class=\"wp-image-121308\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-11.png 585w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-11-300x247.png 300w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u1ea5u h\u00ecnh \u0111\u01b0\u1eddng d\u1eabn (Executable Path) trong n8n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h4 id=\"B\u01b0\u1edbc_3:_V\u00f4_hi\u1ec7u_h\u00f3a_Sandbox_(Launch_Arguments)\"><a id=\"post-121297-_hoggzskcm8ge\"><\/a>B\u01b0\u1edbc 3: V\u00f4 hi\u1ec7u h\u00f3a Sandbox (Launch Arguments)<\/h4>\n\n\n\n<p><\/p>\n\n\n\n<p>\u0110\u1ec3 tr\u00ecnh duy\u1ec7t ho\u1ea1t \u0111\u1ed9ng \u1ed5n \u0111\u1ecbnh trong m\u00f4i tr\u01b0\u1eddng Container m\u00e0 kh\u00f4ng b\u1ecb ch\u1eb7n b\u1edfi c\u01a1 ch\u1ebf b\u1ea3o m\u1eadt, ng\u01b0\u1eddi d\u00f9ng c\u1ea7n thi\u1ebft l\u1eadp c\u00e1c tham s\u1ed1 kh\u1edfi \u0111\u1ed9ng.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ti\u1ebfp t\u1ee5c t\u1ea1i ph\u1ea7n <strong>Options<\/strong>, ch\u1ecdn <strong>Add Option<\/strong>.<\/li>\n\n\n\n<li>Ch\u1ecdn m\u1ee5c <strong>Launch Arguments<\/strong>.<\/li>\n\n\n\n<li>Nh\u1ea5n n\u00fat <strong>Add Argument<\/strong> v\u00e0 nh\u1eadp d\u00f2ng l\u1ec7nh sau v\u00e0o \u00f4 gi\u00e1 tr\u1ecb: <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>--no-sandbox<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>--disable-setuid-sandbox<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>--disable-dev-shm-usage<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"588\" height=\"614\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-12.png\" alt=\"V\u00f4 hi\u1ec7u h\u00f3a Sandbox\" class=\"wp-image-121309\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-12.png 588w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-12-287x300.png 287w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><figcaption class=\"wp-element-caption\"><strong>V\u00f4 hi\u1ec7u h\u00f3a Sandbox<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>\u0110\u1ec3 tr\u00e1nh vi\u1ec7c ph\u1ea3i c\u1ea5u h\u00ecnh l\u1ea1i c\u00e1c b\u01b0\u1edbc tr\u00ean m\u1ed7i khi kh\u1edfi t\u1ea1o l\u1ea1i Container (v\u00ed d\u1ee5 khi chuy\u1ec3n server ho\u1eb7c update n8n), gi\u1ea3i ph\u00e1p l\u00e2u d\u00e0i l\u00e0 th\u00eam bi\u1ebfn m\u00f4i tr\u01b0\u1eddng v\u00e0o file <strong>docker-compose.yml<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>environment:\n\n- PUPPETEER_EXECUTABLE_PATH=\/usr\/bin\/chromium-browser\n\n- PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true<\/code><\/pre>\n\n\n\n<p>Vi\u1ec7c khai b\u00e1o n\u00e0y gi\u00fap n8n t\u1ef1 \u0111\u1ed9ng nh\u1eadn di\u1ec7n \u0111\u01b0\u1eddng d\u1eabn tr\u00ecnh duy\u1ec7t ngay khi kh\u1edfi \u0111\u1ed9ng.<\/p>\n\n\n\n<h3 id=\"K\u1ebft_lu\u1eadn\"><a id=\"post-121297-_qicmfz2eevhn\"><\/a><strong>K\u1ebft lu\u1eadn<\/strong><\/h3>\n\n\n\n<p>Hy v\u1ecdng nh\u1eefng h\u01b0\u1edbng d\u1eabn chi ti\u1ebft trong b\u00e0i vi\u1ebft \u0111\u00e3 trang b\u1ecb \u0111\u1ea7y \u0111\u1ee7 ki\u1ebfn th\u1ee9c \u0111\u1ec3 b\u1ea1n \u0111\u1ecdc t\u1ef1 tin tri\u1ec3n khai c\u00e1c k\u1ecbch b\u1ea3n t\u01b0\u01a1ng t\u00e1c web ph\u1ee9c t\u1ea1p. H\u00e3y b\u1eaft tay v\u00e0o th\u1ef1c hi\u1ec7n ngay h\u00f4m nay \u0111\u1ec3 tr\u1ea3i nghi\u1ec7m s\u1ef1 hi\u1ec7u qu\u1ea3 v\u01b0\u1ee3t tr\u1ed9i m\u00e0 h\u1ec7 th\u1ed1ng n\u00e0y mang l\u1ea1i cho c\u00f4ng vi\u1ec7c kinh doanh v\u00e0 k\u1ef9 thu\u1eadt c\u1ee7a b\u1ea1n.<\/p>\n\n\n\n<h2 id=\"Nh\u1eefng_c\u00e2u_h\u1ecfi_th\u01b0\u1eddng_g\u1eb7p\"><a id=\"post-121297-_jifb3hw53yut\"><\/a>Nh\u1eefng c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p<\/h2>\n\n\n\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Khi_n\u00e0o_n\u00ean_d\u00f9ng_Puppeteer_thay_v\u00ec_node_HTTP_Request_th\u00f4ng_th\u01b0\u1eddng?\">Khi n\u00e0o n\u00ean d\u00f9ng Puppeteer thay v\u00ec node HTTP Request th\u00f4ng th\u01b0\u1eddng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>Ng\u01b0\u1eddi d\u00f9ng n\u00ean \u01b0u ti\u00ean s\u1eed d\u1ee5ng Puppeteer khi c\u1ea7n thu th\u1eadp d\u1eef li\u1ec7u t\u1eeb c\u00e1c trang web \u0111\u1ed9ng (Dynamic Websites) \u0111\u01b0\u1ee3c x\u00e2y d\u1ef1ng b\u1eb1ng React, VueJS ho\u1eb7c Angular, n\u01a1i n\u1ed9i dung ch\u1ec9 hi\u1ec3n th\u1ecb sau khi JavaScript \u0111\u00e3 ch\u1ea1y. Ngo\u00e0i ra, c\u00f4ng c\u1ee5 n\u00e0y l\u00e0 l\u1ef1a ch\u1ecdn b\u1eaft bu\u1ed9c n\u1ebfu quy tr\u00ecnh y\u00eau c\u1ea7u c\u00e1c t\u01b0\u01a1ng t\u00e1c ph\u1ee9c t\u1ea1p nh\u01b0: cu\u1ed9n trang, click n\u00fat, ch\u1ee5p \u1ea3nh m\u00e0n h\u00ecnh ho\u1eb7c xu\u1ea5t trang web ra file PDF.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"L\u00e0m_th\u1ebf_n\u00e0o_\u0111\u1ec3_l\u1ea5y_ch\u00ednh_x\u00e1c_m\u1ed9t_\u0111o\u1ea1n_v\u0103n_b\u1ea3n_ho\u1eb7c_gi\u00e1_tr\u1ecb_c\u1ee5_th\u1ec3_tr\u00ean_trang_web?\">L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 l\u1ea5y ch\u00ednh x\u00e1c m\u1ed9t \u0111o\u1ea1n v\u0103n b\u1ea3n ho\u1eb7c gi\u00e1 tr\u1ecb c\u1ee5 th\u1ec3 tr\u00ean trang web?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>\u0110\u1ec3 tr\u00edch xu\u1ea5t d\u1eef li\u1ec7u, Puppeteer y\u00eau c\u1ea7u b\u1ea1n cung c\u1ea5p &#8220;CSS Selector&#8221; ho\u1eb7c &#8220;XPath&#8221; c\u1ee7a ph\u1ea7n t\u1eed \u0111\u00f3. B\u1ea1n th\u1ec3 l\u1ea5y c\u00e1c gi\u00e1 tr\u1ecb n\u00e0y b\u1eb1ng c\u00e1ch nh\u1ea5n chu\u1ed9t ph\u1ea3i v\u00e0o ph\u1ea7n t\u1eed tr\u00ean tr\u00ecnh duy\u1ec7t Chrome th\u1eadt, ch\u1ecdn &#8220;<strong>Inspect<\/strong>&#8221; (Ki\u1ec3m tra), sau \u0111\u00f3 sao ch\u00e9p \u0111\u01b0\u1eddng d\u1eabn Selector v\u00e0 d\u00e1n v\u00e0o c\u1ea5u h\u00ecnh c\u1ee7a node trong n8n.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Puppeteer_c\u00f3_th\u1ec3_t\u1ef1_\u0111\u1ed9ng_\u0111i\u1ec1n_form_ho\u1eb7c_nh\u1eadp_d\u1eef_li\u1ec7u_v\u00e0o_\u00f4_t\u00ecm_ki\u1ebfm_kh\u00f4ng?\">Puppeteer c\u00f3 th\u1ec3 t\u1ef1 \u0111\u1ed9ng \u0111i\u1ec1n form ho\u1eb7c nh\u1eadp d\u1eef li\u1ec7u v\u00e0o \u00f4 t\u00ecm ki\u1ebfm kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>Ho\u00e0n to\u00e0n c\u00f3 th\u1ec3. Node Puppeteer cung c\u1ea5p c\u00e1c thao t\u00e1c nh\u01b0 Type (Nh\u1eadp li\u1ec7u) ho\u1eb7c Focus (Tr\u1ecf chu\u1ed9t). B\u1ea1n ch\u1ec9 c\u1ea7n x\u00e1c \u0111\u1ecbnh \u0111\u00fang Selector c\u1ee7a \u00f4 nh\u1eadp li\u1ec7u (Input field), sau \u0111\u00f3 truy\u1ec1n gi\u00e1 tr\u1ecb v\u0103n b\u1ea3n mong mu\u1ed1n v\u00e0o. T\u00ednh n\u0103ng n\u00e0y r\u1ea5t h\u1eefu \u00edch cho c\u00e1c k\u1ecbch b\u1ea3n t\u1ef1 \u0111\u1ed9ng \u0111\u0103ng k\u00fd t\u00e0i kho\u1ea3n ho\u1eb7c t\u00ecm ki\u1ebfm th\u00f4ng tin h\u00e0ng lo\u1ea1t.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"L\u00e0m_sao_\u0111\u1ec3_x\u1eed_l\u00fd_c\u00e1c_trang_web_t\u1ea3i_n\u1ed9i_dung_theo_d\u1ea1ng_&quot;Cu\u1ed9n_v\u00f4_t\u1eadn&quot;_(Infinite_Scroll)?\">L\u00e0m sao \u0111\u1ec3 x\u1eed l\u00fd c\u00e1c trang web t\u1ea3i n\u1ed9i dung theo d\u1ea1ng &quot;Cu\u1ed9n v\u00f4 t\u1eadn&quot; (Infinite Scroll)?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>\u0110\u1ed1i v\u1edbi c\u00e1c trang web ch\u1ec9 t\u1ea3i th\u00eam b\u00e0i vi\u1ebft khi k\u00e9o xu\u1ed1ng cu\u1ed1i trang, ng\u01b0\u1eddi d\u00f9ng c\u1ea7n s\u1eed d\u1ee5ng t\u00ednh n\u0103ng th\u1ef1c thi m\u00e3 JavaScript (Page.evaluate) b\u00ean trong Puppeteer. B\u1eb1ng c\u00e1ch ch\u00e8n m\u1ed9t \u0111o\u1ea1n m\u00e3 l\u1ec7nh y\u00eau c\u1ea7u tr\u00ecnh duy\u1ec7t cu\u1ed9n chu\u1ed9t xu\u1ed1ng \u0111\u00e1y v\u00e0 ch\u1edd \u0111\u1ee3i (Wait) m\u1ed9t kho\u1ea3ng th\u1eddi gian nh\u1ea5t \u0111\u1ecbnh, to\u00e0n b\u1ed9 n\u1ed9i dung s\u1ebd \u0111\u01b0\u1ee3c t\u1ea3i \u0111\u1ea7y \u0111\u1ee7 tr\u01b0\u1edbc khi th\u1ef1c hi\u1ec7n b\u01b0\u1edbc c\u00e0o d\u1eef li\u1ec7u.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"C\u00e1ch_t\u1ed1i_\u01b0u_nh\u1ea5t_\u0111\u1ec3_tr\u00e1nh_b\u1ecb_website_ph\u00e1t_hi\u1ec7n_l\u00e0_robot?\">C\u00e1ch t\u1ed1i \u01b0u nh\u1ea5t \u0111\u1ec3 tr\u00e1nh b\u1ecb website ph\u00e1t hi\u1ec7n l\u00e0 robot?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>\u0110\u1ec3 gi\u1ea3m thi\u1ec3u r\u1ee7i ro b\u1ecb ch\u1eb7n, ng\u01b0\u1eddi qu\u1ea3n tr\u1ecb n\u00ean c\u1ea5u h\u00ecnh Puppeteer s\u1eed d\u1ee5ng <strong>Stealth Mode<\/strong> (n\u1ebfu c\u00f3 plugin h\u1ed7 tr\u1ee3) ho\u1eb7c t\u00f9y ch\u1ec9nh <strong>User-Agent<\/strong> gi\u1ed1ng v\u1edbi tr\u00ecnh duy\u1ec7t c\u1ee7a ng\u01b0\u1eddi d\u00f9ng th\u1eadt. Ngo\u00e0i ra, vi\u1ec7c th\u00eam c\u00e1c kho\u1ea3ng th\u1eddi gian ch\u1edd ng\u1eabu nhi\u00ean (Random Delay) gi\u1eefa c\u00e1c h\u00e0nh \u0111\u1ed9ng click ho\u1eb7c nh\u1eadp li\u1ec7u s\u1ebd gi\u00fap h\u00e0nh vi c\u1ee7a bot tr\u1edf n\u00ean t\u1ef1 nhi\u00ean h\u01a1n.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\n<script type=\"application\/ld+json\">\n\t{\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Khi n\u00e0o n\u00ean d\u00f9ng Puppeteer thay v\u00ec node HTTP Request th\u00f4ng th\u01b0\u1eddng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Ng\u01b0\u1eddi d\u00f9ng n\u00ean \u01b0u ti\u00ean s\u1eed d\u1ee5ng Puppeteer khi c\u1ea7n thu th\u1eadp d\u1eef li\u1ec7u t\u1eeb c\u00e1c trang web \u0111\u1ed9ng (Dynamic Websites) \u0111\u01b0\u1ee3c x\u00e2y d\u1ef1ng b\u1eb1ng React, VueJS ho\u1eb7c Angular, n\u01a1i n\u1ed9i dung ch\u1ec9 hi\u1ec3n th\u1ecb sau khi JavaScript \u0111\u00e3 ch\u1ea1y. Ngo\u00e0i ra, c\u00f4ng c\u1ee5 n\u00e0y l\u00e0 l\u1ef1a ch\u1ecdn b\u1eaft bu\u1ed9c n\u1ebfu quy tr\u00ecnh y\u00eau c\u1ea7u c\u00e1c t\u01b0\u01a1ng t\u00e1c ph\u1ee9c t\u1ea1p nh\u01b0: cu\u1ed9n trang, click n\u00fat, ch\u1ee5p \u1ea3nh m\u00e0n h\u00ecnh ho\u1eb7c xu\u1ea5t trang web ra file PDF.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 l\u1ea5y ch\u00ednh x\u00e1c m\u1ed9t \u0111o\u1ea1n v\u0103n b\u1ea3n ho\u1eb7c gi\u00e1 tr\u1ecb c\u1ee5 th\u1ec3 tr\u00ean trang web?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>\u0110\u1ec3 tr\u00edch xu\u1ea5t d\u1eef li\u1ec7u, Puppeteer y\u00eau c\u1ea7u b\u1ea1n cung c\u1ea5p \\\"CSS Selector\\\" ho\u1eb7c \\\"XPath\\\" c\u1ee7a ph\u1ea7n t\u1eed \u0111\u00f3. B\u1ea1n th\u1ec3 l\u1ea5y c\u00e1c gi\u00e1 tr\u1ecb n\u00e0y b\u1eb1ng c\u00e1ch nh\u1ea5n chu\u1ed9t ph\u1ea3i v\u00e0o ph\u1ea7n t\u1eed tr\u00ean tr\u00ecnh duy\u1ec7t Chrome th\u1eadt, ch\u1ecdn \\\"<strong>Inspect<\/strong>\\\" (Ki\u1ec3m tra), sau \u0111\u00f3 sao ch\u00e9p \u0111\u01b0\u1eddng d\u1eabn Selector v\u00e0 d\u00e1n v\u00e0o c\u1ea5u h\u00ecnh c\u1ee7a node trong n8n.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Puppeteer c\u00f3 th\u1ec3 t\u1ef1 \u0111\u1ed9ng \u0111i\u1ec1n form ho\u1eb7c nh\u1eadp d\u1eef li\u1ec7u v\u00e0o \u00f4 t\u00ecm ki\u1ebfm kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Ho\u00e0n to\u00e0n c\u00f3 th\u1ec3. Node Puppeteer cung c\u1ea5p c\u00e1c thao t\u00e1c nh\u01b0 Type (Nh\u1eadp li\u1ec7u) ho\u1eb7c Focus (Tr\u1ecf chu\u1ed9t). B\u1ea1n ch\u1ec9 c\u1ea7n x\u00e1c \u0111\u1ecbnh \u0111\u00fang Selector c\u1ee7a \u00f4 nh\u1eadp li\u1ec7u (Input field), sau \u0111\u00f3 truy\u1ec1n gi\u00e1 tr\u1ecb v\u0103n b\u1ea3n mong mu\u1ed1n v\u00e0o. T\u00ednh n\u0103ng n\u00e0y r\u1ea5t h\u1eefu \u00edch cho c\u00e1c k\u1ecbch b\u1ea3n t\u1ef1 \u0111\u1ed9ng \u0111\u0103ng k\u00fd t\u00e0i kho\u1ea3n ho\u1eb7c t\u00ecm ki\u1ebfm th\u00f4ng tin h\u00e0ng lo\u1ea1t.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"L\u00e0m sao \u0111\u1ec3 x\u1eed l\u00fd c\u00e1c trang web t\u1ea3i n\u1ed9i dung theo d\u1ea1ng \\\"Cu\u1ed9n v\u00f4 t\u1eadn\\\" (Infinite Scroll)?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>\u0110\u1ed1i v\u1edbi c\u00e1c trang web ch\u1ec9 t\u1ea3i th\u00eam b\u00e0i vi\u1ebft khi k\u00e9o xu\u1ed1ng cu\u1ed1i trang, ng\u01b0\u1eddi d\u00f9ng c\u1ea7n s\u1eed d\u1ee5ng t\u00ednh n\u0103ng th\u1ef1c thi m\u00e3 JavaScript (Page.evaluate) b\u00ean trong Puppeteer. B\u1eb1ng c\u00e1ch ch\u00e8n m\u1ed9t \u0111o\u1ea1n m\u00e3 l\u1ec7nh y\u00eau c\u1ea7u tr\u00ecnh duy\u1ec7t cu\u1ed9n chu\u1ed9t xu\u1ed1ng \u0111\u00e1y v\u00e0 ch\u1edd \u0111\u1ee3i (Wait) m\u1ed9t kho\u1ea3ng th\u1eddi gian nh\u1ea5t \u0111\u1ecbnh, to\u00e0n b\u1ed9 n\u1ed9i dung s\u1ebd \u0111\u01b0\u1ee3c t\u1ea3i \u0111\u1ea7y \u0111\u1ee7 tr\u01b0\u1edbc khi th\u1ef1c hi\u1ec7n b\u01b0\u1edbc c\u00e0o d\u1eef li\u1ec7u.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"C\u00e1ch t\u1ed1i \u01b0u nh\u1ea5t \u0111\u1ec3 tr\u00e1nh b\u1ecb website ph\u00e1t hi\u1ec7n l\u00e0 robot?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>\u0110\u1ec3 gi\u1ea3m thi\u1ec3u r\u1ee7i ro b\u1ecb ch\u1eb7n, ng\u01b0\u1eddi qu\u1ea3n tr\u1ecb n\u00ean c\u1ea5u h\u00ecnh Puppeteer s\u1eed d\u1ee5ng <strong>Stealth Mode<\/strong> (n\u1ebfu c\u00f3 plugin h\u1ed7 tr\u1ee3) ho\u1eb7c t\u00f9y ch\u1ec9nh <strong>User-Agent<\/strong> gi\u1ed1ng v\u1edbi tr\u00ecnh duy\u1ec7t c\u1ee7a ng\u01b0\u1eddi d\u00f9ng th\u1eadt. Ngo\u00e0i ra, vi\u1ec7c th\u00eam c\u00e1c kho\u1ea3ng th\u1eddi gian ch\u1edd ng\u1eabu nhi\u00ean (Random Delay) gi\u1eefa c\u00e1c h\u00e0nh \u0111\u1ed9ng click ho\u1eb7c nh\u1eadp li\u1ec7u s\u1ebd gi\u00fap h\u00e0nh vi c\u1ee7a bot tr\u1edf n\u00ean t\u1ef1 nhi\u00ean h\u01a1n.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t]\n\t}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Trong k\u1ef7 nguy\u00ean d\u1eef li\u1ec7u, nhu c\u1ea7u thu th\u1eadp th\u00f4ng tin v\u00e0 t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00e1c t\u00e1c v\u1ee5 tr\u00ean tr\u00ecnh duy\u1ec7t ng\u00e0y c\u00e0ng tr\u1edf n\u00ean c\u1ea5p thi\u1ebft. Tuy nhi\u00ean, c\u00e1c ph\u01b0\u01a1ng ph\u00e1p g\u1eedi HTTP Request truy\u1ec1n th\u1ed1ng th\u01b0\u1eddng g\u1eb7p kh\u00f3 kh\u0103n khi \u0111\u1ed1i m\u1eb7t v\u1edbi nh\u1eefng trang web s\u1eed d\u1ee5ng nhi\u1ec1u JavaScript ho\u1eb7c y\u00eau c\u1ea7u [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":121313,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7397],"tags":[7474],"class_list":["post-121297","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-n8n","tag-n8n-va-puppeteer"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/121297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=121297"}],"version-history":[{"count":4,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/121297\/revisions"}],"predecessor-version":[{"id":121316,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/121297\/revisions\/121316"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/121313"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=121297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=121297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=121297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}