{"id":2867,"date":"2021-04-01T17:31:45","date_gmt":"2021-04-01T09:31:45","guid":{"rendered":"https:\/\/www.xunicard.com\/?p=2867"},"modified":"2021-04-20T17:51:06","modified_gmt":"2021-04-20T09:51:06","slug":"%e6%95%99%e7%a8%8b%ef%bd%9cadspower%e6%b5%8f%e8%a7%88%e5%99%a8local-api%e6%8e%a5%e5%8f%a3%e5%92%8cheadless%e6%93%8d%e4%bd%9c%e8%af%b4%e6%98%8e","status":"publish","type":"post","link":"https:\/\/www.xunicard.com\/?p=2867","title":{"rendered":"\u6559\u7a0b\uff5cAdsPower\u6d4f\u89c8\u5668Local API\u63a5\u53e3\u548cheadless\u64cd\u4f5c\u8bf4\u660e"},"content":{"rendered":"<p>\u76ee\u524d\uff0cAdsPower\u5ba2\u6237\u7aef\u6700\u65b0\u7248\u672c\uff08\u5e94\u7528\u7248\u672cv3.3.2\u53ca\u4ee5\u4e0a\uff0c\u5185\u6838\u7248\u672cv2.4.2.8\u53ca\u4ee5\u4e0a\uff09\u5df2\u652f\u6301headless\u914d\u5408api-key\u542f\u52a8\u65e0\u754c\u9762\u670d\u52a1\u5e76\u4f7f\u7528Local API<\/p>\n<p>* \u8be5\u529f\u80fd\u4ec5\u5f00\u653e\u7ed9\u6709Local\u00a0API\u529f\u80fd\u6743\u9650\u7684\u7528\u6237\u4f7f\u7528\uff0c\u5982\u9700\u5f00\u901a\uff0c\u53ef\u5411\u5728\u7ebf\u5ba2\u670d\u54a8\u8be2\u7533\u8bf7<\/p>\n<p><strong>headless\uff1a<\/strong>\u542f\u52a8\u201c\u65e0\u754c\u9762\u670d\u52a1\u201d\u7684\u53c2\u6570<\/p>\n<p><strong>api-key\uff1a<\/strong><strong>\u201c<\/strong>\u65e0\u754c\u9762\u670d\u52a1\u201d\u4e2d\u64cd\u4f5cLocal API\u63a5\u53e3\u7684\u8eab\u4efd\u51ed\u8bc1\uff0c\u4e00\u4e2a\u8d26\u53f7\u5bf9\u5e94\u4e00\u4e2aapi-key\uff0c\u652f\u6301\u4e00\u4e2a\u8d26\u53f7\u5728\u591a\u8bbe\u5907\u540c\u65f6\u64cd\u4f5cLocal API\u63a5\u53e3<\/p>\n<p><strong>\u5982\u4f55<\/strong><strong>\u542f\u52a8\u65e0\u754c\u9762<\/strong><strong>\u670d\u52a1\uff1f<\/strong><\/p>\n<ul>\n<li><b>\u4e00\u3001\u00a0<\/b><strong>\u83b7\u53d6<\/strong><strong>api-key<\/strong><\/li>\n<\/ul>\n<p>1\uff09\u542f\u52a8AdsPower\u5ba2\u6237\u7aef\uff0c\u5728\u201c\u8d26\u53f7\u7ba1\u7406-\u8bbe\u7f6e\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2869\" src=\"https:\/\/www.xunicard.com\/wp-content\/uploads\/2021\/04\/039f0887b1ec94e.png\" alt=\"\" width=\"554\" height=\"168\" \/><\/p>\n<p>2\uff09\u5728\u201c\u57fa\u7840API\u63a5\u53e3\u201d\u70b9\u51fb\u201c\u751f\u6210api-key\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2870\" src=\"https:\/\/www.xunicard.com\/wp-content\/uploads\/2021\/04\/3859b767614f8a8.png\" alt=\"\" width=\"529\" height=\"240\" \/><\/p>\n<p>3\uff09\u590d\u5236\u5df2\u751f\u6210\u7684api-key<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2871\" src=\"https:\/\/www.xunicard.com\/wp-content\/uploads\/2021\/04\/f40fe9eaf23ce6f.png\" alt=\"\" width=\"554\" height=\"111\" \/><\/p>\n<p><strong>\u4e8c\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u547d\u4ee4\u914d\u5408api-key\u542f\u52a8\u65e0\u754c\u9762\u670d\u52a1<\/strong><\/p>\n<ul>\n<li>1\uff09\u00a0\u8bf7\u786e\u4fdd\u60a8\u5728AdsPower\u4e3b\u76ee\u5f55\u4e2d\u5df2\u6253\u5f00\u4e86CMD\u6216Terminal<\/li>\n<\/ul>\n<p>* \u5728Windows\u8bbe\u5907\u4e2d\uff0c\u76ee\u5f55\u8def\u5f84\u901a\u5e38\u4e3a\u00a0&#8220;C:\\Program Files (x86)\\AdsPower&#8221;<\/p>\n<p>2\uff09\u547d\u4ee4\u884c\u542f\u52a8<\/p>\n<p>\u5c06\u5728AdsPower\u5ba2\u6237\u7aef\u5df2\u590d\u5236\u597d\u7684api-key\u590d\u5236\u5230\u5bf9\u5e94\u7684\u547d\u4ee4\u884c\u4e2d<\/p>\n<p>\ufe0f\u00a0\u6ce8\u610f\uff1a\u542f\u52a8\u65e0\u754c\u9762\u670d\u52a1\u65f6\uff0c\u652f\u6301\u4f20\u5165\u7684\u53c2\u6570\u6709<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"107\">\u53c2\u6570<\/td>\n<td width=\"46\">\u662f\u5426\u5fc5\u586b<\/td>\n<td width=\"274\">\u8bf4\u660e<\/td>\n<\/tr>\n<tr>\n<td width=\"107\">&#8211;headless<\/td>\n<td width=\"46\">\u662f<\/td>\n<td width=\"274\">\u503c\u4e3atrue\u65f6\uff0c\u6307\u5b9a\u7684\u662f\u65e0\u754c\u9762\u670d\u52a1<\/td>\n<\/tr>\n<tr>\n<td width=\"107\">&#8211;api-key<\/td>\n<td width=\"46\">\u662f<\/td>\n<td width=\"274\">\u65e0\u754c\u9762\u670d\u52a1\u64cd\u4f5cLocal API\u63a5\u53e3\u7684\u8eab\u4efd\u51ed\u8bc1<\/td>\n<\/tr>\n<tr>\n<td width=\"107\">&#8211;api-port<\/td>\n<td width=\"46\">\u5426<\/td>\n<td width=\"274\">\u6307\u5b9a\u7684Local API\u670d\u52a1\u7aef\u53e3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>* Windows\/Mac\u7cfb\u7edf\u5bf9\u5e94\u53c2\u6570\u53c2\u8003<\/p>\n<p><strong>Windows<\/strong><strong>\uff1a<\/strong>AdsPower.exe &#8211;headless=true &#8211;api-key=XXXX \u00a0&#8211;api-port=50325<\/p>\n<p><strong>MacOS<\/strong><strong>\uff1a<\/strong>\/Applications\/adsPower.app\/Contents\/MacOS\/Adspower &#8211;args\u00a0&#8211;headless=true &#8211;api-key=XXXX \u00a0&#8211;api-port=50325<\/p>\n<p>3\uff09\u542f\u52a8\u6210\u529f<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u5de5\u5177\u5904\u53ef\u4ee5\u770b\u5230\u542f\u52a8\u6210\u529f\u540e\u8fd4\u56de\u7684Local API\u5730\u5740\uff0c\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2868\" src=\"https:\/\/www.xunicard.com\/wp-content\/uploads\/2021\/04\/435c631ed005ab1.png\" alt=\"\" width=\"554\" height=\"164\" \/><\/p>\n<p><strong>\u6709\u754c\u9762\u670d\u52a1<\/strong><strong>VS<\/strong><strong>\u65e0\u754c\u9762\u670d\u52a1<\/strong><\/p>\n<p>\u201c\u6709\u754c\u9762\u670d\u52a1\u201d\u4f1a\u88ab\u9650\u5236\u540c\u4e2a\u8d26\u53f7\u53ea\u80fd\u5728\u4e00\u4e2a\u8bbe\u5907\u767b\u5f55\uff1b\u201c\u65e0\u754c\u9762\u670d\u52a1\u201d\u5219\u4e0d\u9650\u5236\u540c\u4e2a\u8d26\u53f7\u540c\u65f6\u767b\u5f55\u591a\u4e2a\u8bbe\u5907\u7684\u573a\u666f\u3002<\/p>\n<p>\u5982\u679c\u6709\u4e00\u4e2a\u8d26\u53f7\u60f3\u8981\u5728\u591a\u4e2a\u8bbe\u5907\u4e0a\u8dd1\u81ea\u52a8\u5316\u7684\u9700\u6c42\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528headless\u914d\u5408api-key\u65b9\u5f0f\u4f7f\u7528Local API\u63a5\u53e3\uff01<\/p>\n<p><strong>\u64cd\u4f5cFAQ<\/strong><\/p>\n<p><strong>Q\uff1a<\/strong><strong>\u6211<\/strong><strong>\u53ef\u4ee5\u5728\u4e00\u4e2a\u8bbe\u5907\u540c\u65f6\u542f\u52a8\u6709\u754c\u9762\u548c\u65e0\u754c\u9762\u670d\u52a1\u5417\uff1f<\/strong><\/p>\n<p>A\uff1a\u4e0d\u53ef\u4ee5\u7684\u3002<\/p>\n<p><strong>Q\uff1a\u5982\u679c\u66f4\u6362\u4e86api-key\uff0c\u7528\u65e7\u503c\u542f\u52a8\u7684\u670d\u52a1\u8c03\u7528\u7684api\u63a5\u53e3\u8fd8\u80fd\u7ee7\u7eed\u7528\u5417\uff1f<\/strong><\/p>\n<p>A\uff1a\u4e0d\u80fd\uff0c\u542f\u52a8\u65f6\u7cfb\u7edf\u4f1a\u8fd4\u56deapi-key\u5931\u6548\u7684\u4fe1\u606f\u3002\u5f53\u524d\u64cd\u4f5c\u4e00\u4e2a\u8d26\u53f7\u4ec5\u80fd\u5bf9\u5e94\u4e00\u4e2aapi-key\uff0c\u5982\u91cd\u7f6e\u4e86api-key\uff0c\u65e7\u503c\u5c06\u5931\u6548\uff0c\u9700\u8981\u91cd\u65b0\u8bbe\u503c\u8c03\u7528\u3002<\/p>\n<p><strong>Q\uff1a\u5982\u4f55\u91cd\u7f6eapi-key\uff1f<\/strong><\/p>\n<p>A\uff1a\u56de\u5230\u5ba2\u6237\u7aef\u201c\u8d26\u53f7\u7ba1\u7406-\u8bbe\u7f6e\u201d\u754c\u9762\uff0c\u70b9\u51fb\u201c\u91cd\u7f6eapi-key\u201d\u83b7\u53d6\u65b0\u7684api-key\uff0c\u91cd\u7f6e\u540e\u8bf7\u6ce8\u610f\u4fdd\u5b58\u65b0\u7684api-key.<\/p>\n<p><strong>Q\uff1a\u5982\u679c\u66f4\u6362\u4e86api-key\uff0c\u662f\u5426\u80fd\u5bf9\u5df2\u542f\u52a8\u7684\u670d\u52a1\u8fdb\u884capi-key\u7684\u66f4\u65b0\u5462\uff1f<\/strong><\/p>\n<p>A\uff1a\u4e0d\u80fd\u3002\u9700\u5148\u5173\u95ed\u670d\u52a1\uff0c\u91cd\u65b0\u7528\u65b0\u7684api-key\u542f\u52a8\u670d\u52a1\u3002<\/p>\n<p><strong>Q\uff1a\u5982\u4f55\u5173\u95ed\u670d\u52a1\uff1f<\/strong><\/p>\n<p>A\uff1a\u53ef\u901a\u8fc7ctrl+c(CMD\u4e0b)\u6216\u5173\u95ed\u547d\u4ee4\u884c\u7a97\u53e3\u5c06\u670d\u52a1\u5173\u95ed\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u524d\uff0cAdsPower\u5ba2\u6237\u7aef\u6700\u65b0\u7248\u672c\uff08\u5e94\u7528\u7248\u672cv3.3.2\u53ca\u4ee5\u4e0a\uff0c\u5185\u6838\u7248\u672cv2.4.2.8\u53ca\u4ee5\u4e0a\uff09\u5df2\u652f\u6301headless\u914d\u5408api-key\u542f\u52a8\u65e0\u754c\u9762\u670d\u52a1\u5e76\u4f7f\u7528Local API * \u8be5\u529f\u80fd\u4ec5\u5f00\u653e\u7ed9\u6709Local\u00a0API\u529f\u80fd\u6743\u9650\u7684\u7528\u6237\u4f7f\u7528\uff0c\u5982\u9700&#8230;<\/p>\n","protected":false},"author":530,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-2867","post","type-post","status-publish","format-standard","hentry","category-hangyedongtai"],"_links":{"self":[{"href":"https:\/\/www.xunicard.com\/index.php?rest_route=\/wp\/v2\/posts\/2867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xunicard.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xunicard.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xunicard.com\/index.php?rest_route=\/wp\/v2\/users\/530"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xunicard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2867"}],"version-history":[{"count":2,"href":"https:\/\/www.xunicard.com\/index.php?rest_route=\/wp\/v2\/posts\/2867\/revisions"}],"predecessor-version":[{"id":2873,"href":"https:\/\/www.xunicard.com\/index.php?rest_route=\/wp\/v2\/posts\/2867\/revisions\/2873"}],"wp:attachment":[{"href":"https:\/\/www.xunicard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xunicard.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xunicard.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2867"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.xunicard.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=2867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}