{"id":6996,"date":"2024-11-28T13:34:16","date_gmt":"2024-11-28T05:34:16","guid":{"rendered":"https:\/\/www.cloudbypass.com\/tutorial\/?p=6996"},"modified":"2024-11-28T13:34:16","modified_gmt":"2024-11-28T05:34:16","slug":"%e7%a9%bf%e4%ba%91api%e5%8a%a9%e4%bd%a0%e6%b7%b1%e5%ba%a6%e6%8c%96%e6%8e%98gmgn-ai%e5%b8%82%e5%9c%ba%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/www.cloudbypass.com\/tutorial\/6996.html","title":{"rendered":"\u7a7f\u4e91API\u52a9\u4f60\u6df1\u5ea6\u6316\u6398GMGN.ai\u5e02\u573a\u6570\u636e"},"content":{"rendered":"\n<p>\u4f5c\u4e3a\u4e00\u540d\u6570\u636e\u91c7\u96c6\u5de5\u4f5c\u8005\uff0c\u6211\u6df1\u77e5\u6570\u636e\u7684\u91cd\u8981\u6027\u3002\u5728\u65e5\u5e38\u5de5\u4f5c\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u4f1a\u9047\u5230\u5404\u79cd\u5404\u6837\u7684\u53cd\u722c\u63aa\u65bd\uff0c\u8fd9\u4e9b\u63aa\u65bd\u6781\u5927\u5730\u963b\u788d\u4e86\u6211\u4eec\u83b7\u53d6\u6570\u636e\u7684\u6548\u7387\u3002\u5176\u4e2d\uff0cCloudflare\u76845\u79d2\u76fe\u4eba\u673a\u9a8c\u8bc1\u548cTurnstile CAPTCHA\u9a8c\u8bc1\u66f4\u662f\u4ee4\u65e0\u6570\u722c\u866b\u5de5\u7a0b\u5e08\u5934\u75bc\u4e0d\u5df2\u3002<\/p>\n\n\n\n<p>\u76f4\u5230\u6211\u9047\u5230\u4e86\u7a7f\u4e91API\uff0c\u624d\u771f\u6b63\u8ba9\u6211\u770b\u5230\u4e86\u5e0c\u671b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7a7f\u4e91API\uff0c\u6211\u7684\u6570\u636e\u91c7\u96c6\u201c\u745e\u58eb\u519b\u5200\u201d<\/h3>\n\n\n\n<p>\u7a7f\u4e91API\u5c31\u50cf\u4e00\u628a\u591a\u529f\u80fd\u7684\u201c\u745e\u58eb\u519b\u5200\u201d\uff0c\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u5168\u65b9\u4f4d\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5b83\u4e0d\u4ec5\u80fd\u8f7b\u677e<a href=\"https:\/\/www.cloudbypass.com\/\" data-type=\"link\" data-id=\"https:\/\/www.cloudbypass.com\/\">\u7ed5\u8fc7Cloudflare<\/a>\u7684\u53cd\u722c5\u79d2\u76fe\u548cWAF\u9632\u62a4\uff0c\u8fd8\u80fd\u7a81\u7834Turnstile CAPTCHA\u9a8c\u8bc1\uff0c\u8ba9\u6211\u4eec\u53ef\u4ee5\u65e0\u963b\u788d\u5730\u6ce8\u518c\u548c\u767b\u5f55\u76ee\u6807\u7f51\u7ad9\uff0c\u5982GMGN.ai\u3002<\/p>\n\n\n\n<p><strong>\u90a3\u4e48\uff0c\u7a7f\u4e91API\u662f\u5982\u4f55\u505a\u5230\u7684\u5462\uff1f<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>HTTP API\u548cS5\u52a8\u6001IP\u4ee3\u7406\u6c60\uff1a<\/strong> \u7a7f\u4e91API\u63d0\u4f9b\u4e86\u7b80\u5355\u6613\u7528\u7684HTTP API\u63a5\u53e3\uff0c\u540c\u65f6\u5185\u7f6e\u4e86\u4e00\u7ad9\u5f0f\u5168\u7403\u9ad8\u901fS5\u52a8\u6001IP\u4ee3\u7406\u6c60\u3002\u901a\u8fc7\u8fd9\u4e9b\u63a5\u53e3\u548c\u4ee3\u7406\u6c60\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u5411\u76ee\u6807\u7f51\u7ad9\u53d1\u9001\u8bf7\u6c42\uff0c\u5e76\u83b7\u53d6\u5230\u6211\u4eec\u9700\u8981\u7684\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>\u4e30\u5bcc\u7684\u8bbe\u7f6e\u9009\u9879\uff1a<\/strong> \u7a7f\u4e91API\u652f\u6301\u8bbe\u7f6eReferer\u3001\u6d4f\u89c8\u5668UA\u548cheadless\u72b6\u6001\u7b49\u5404\u79cd\u6d4f\u89c8\u5668\u6307\u7eb9\u8bbe\u5907\u7279\u5f81\uff0c\u8ba9\u6211\u4eec\u53ef\u4ee5\u6a21\u62df\u771f\u5b9e\u7528\u6237\u7684\u884c\u4e3a\uff0c\u4ece\u800c\u66f4\u6709\u6548\u5730\u7ed5\u8fc7\u53cd\u722c\u63aa\u65bd\u3002<\/li>\n\n\n\n<li><strong>\u5f3a\u5927\u7684\u53cd\u53cd\u722c\u673a\u5236\uff1a<\/strong> \u7a7f\u4e91API\u5185\u7f6e\u4e86\u5f3a\u5927\u7684\u53cd\u53cd\u722c\u673a\u5236\uff0c\u80fd\u591f\u81ea\u52a8\u8bc6\u522b\u5e76\u7ed5\u8fc7\u5404\u79cd\u5e38\u89c1\u7684\u53cd\u722c\u68c0\u6d4b\u624b\u6bb5\uff0c\u5982IP\u5c01\u7981\u3001\u8d26\u53f7\u5c01\u7981\u3001\u884c\u4e3a\u5206\u6790\u7b49\u3002<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"864\" src=\"https:\/\/www.cloudbypass.com\/tutorial\/wp-content\/uploads\/2024\/11\/1-1024x864.png\" alt=\"\" class=\"wp-image-6920\" title=\"\" srcset=\"https:\/\/www.cloudbypass.com\/tutorial\/wp-content\/uploads\/2024\/11\/1-1024x864.png 1024w, https:\/\/www.cloudbypass.com\/tutorial\/wp-content\/uploads\/2024\/11\/1-300x253.png 300w, https:\/\/www.cloudbypass.com\/tutorial\/wp-content\/uploads\/2024\/11\/1-768x648.png 768w, https:\/\/www.cloudbypass.com\/tutorial\/wp-content\/uploads\/2024\/11\/1.png 1276w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">\u8bf7\u6c42\u5934\u8981\u52a0\u914d\u7f6ex-cb-origin\u3001x-cb-referer<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"870\" src=\"https:\/\/www.cloudbypass.com\/tutorial\/wp-content\/uploads\/2024\/11\/2.png\" alt=\"\" class=\"wp-image-6921\" title=\"\" srcset=\"https:\/\/www.cloudbypass.com\/tutorial\/wp-content\/uploads\/2024\/11\/2.png 672w, https:\/\/www.cloudbypass.com\/tutorial\/wp-content\/uploads\/2024\/11\/2-232x300.png 232w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><figcaption class=\"wp-element-caption\">\u5982\u7528\u7a7f\u4e91\u4ee3\u7406\uff0c\u63d0\u53d6IP\u65f6\u8bbe\u7f6e10\u5206\u949f\u65f6\u6548<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u6218\u6848\u4f8b\uff1aGMGN.ai\u5e02\u573a\u6570\u636e\u6df1\u5ea6\u6316\u6398<\/h3>\n\n\n\n<p>\u4e0b\u9762\uff0c\u6211\u5c06\u7ed3\u5408\u81ea\u5df1\u7684\u5b9e\u9645\u5e94\u7528\uff0c\u5206\u4eab\u4e00\u4e0b\u5982\u4f55\u4f7f\u7528\u7a7f\u4e91API\u6765\u6df1\u5ea6\u6316\u6398GMGN.ai\u7684\u5e02\u573a\u6570\u636e\u3002<\/p>\n\n\n\n<p><strong>1. \u51c6\u5907\u5de5\u4f5c<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6ce8\u518c\u7a7f\u4e91API\u8d26\u53f7\uff0c\u5e76\u83b7\u53d6API\u5bc6\u94a5\u3002<\/li>\n\n\n\n<li>\u786e\u5b9a\u9700\u8981\u91c7\u96c6\u7684GMGN.ai\u9875\u9762\u6570\u636e\uff0c\u4f8b\u5982\u5546\u54c1\u4fe1\u606f\u3001\u7528\u6237\u8bc4\u8bba\u3001\u9500\u552e\u6570\u636e\u7b49\u3002<\/li>\n\n\n\n<li>\u51c6\u5907\u597dPython\u7f16\u7a0b\u73af\u5883\uff0c\u5e76\u5b89\u88c5\u76f8\u5173\u7684\u5e93\uff08requests\u3001beautifulsoup4\u7b49\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>2. \u4ee3\u7801\u5b9e\u73b0<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import requests\nimport json\n\n# \u8bbe\u7f6eAPI\u5730\u5740\u548c\u5bc6\u94a5\napi_url = 'https:\/\/api.cloudbypass.com\/v1\/http'\napi_key = '\u4f60\u7684API\u5bc6\u94a5'\n\n# \u8bbe\u7f6e\u8bf7\u6c42\u53c2\u6570\nparams = {\n    'url': 'https:\/\/www.gmgn.ai\/search?q=iphone',  # \u76ee\u6807\u7f51\u7ad9URL\n    'method': 'GET',\n    'headers': {\n        'User-Agent': 'Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/118.0.0.0 Safari<sup><\/sup> &nbsp; \/537.36'\n    }\n}\n\n# \u53d1\u9001\u8bf7\u6c42\nresponse = requests.post(api_url, headers={'Authorization': 'Bearer ' + api_key}, json=params)\n\n# \u89e3\u6790\u54cd\u5e94\u6570\u636e\ndata = json.loads(response.text)\nprint(data&#91;'content'])\n<\/code><\/pre>\n\n\n\n<p>\u8bf7<a href=\"\/faq#coding\" target=\"_blank\" rel=\"noreferrer noopener\">\u8c28\u614e\u4f7f\u7528<\/a>\u4ee3\u7801\u3002<\/p>\n\n\n\n<p><strong>3. \u6570\u636e\u5206\u6790<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5c06\u83b7\u53d6\u5230\u7684\u6570\u636e\u8fdb\u884c\u6e05\u6d17\u548c\u6574\u7406\u3002<\/li>\n\n\n\n<li>\u5229\u7528\u6570\u636e\u53ef\u89c6\u5316\u5de5\u5177\uff0c\u5bf9\u6570\u636e\u8fdb\u884c\u5206\u6790\u548c\u6316\u6398\uff0c\u53d1\u73b0\u5176\u4e2d\u7684\u89c4\u5f8b\u548c\u4ef7\u503c\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u7a7f\u4e91API\uff0c\u8ba9\u6570\u636e\u91c7\u96c6\u53d8\u5f97\u66f4\u7b80\u5355<\/h3>\n\n\n\n<p>\u901a\u8fc7\u4ee5\u4e0a\u7684\u5b9e\u6218\u6848\u4f8b\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u7a7f\u4e91API\u6781\u5927\u5730\u7b80\u5316\u4e86\u6570\u636e\u91c7\u96c6\u7684\u8fc7\u7a0b\u3002\u6211\u4eec\u53ea\u9700\u8981\u7f16\u5199\u5c11\u91cf\u7684\u4ee3\u7801\uff0c\u5c31\u53ef\u4ee5\u8f7b\u677e\u5730\u83b7\u53d6\u5230\u76ee\u6807\u7f51\u7ad9\u7684\u6570\u636e\u3002<\/p>\n\n\n\n<p><strong>\u7a7f\u4e91API\u7684\u4f18\u52bf\u4e0d\u4ec5\u5728\u4e8e\u6280\u672f\u5c42\u9762\uff0c\u66f4\u5728\u4e8e\u5b83\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u4e00\u79cd\u5168\u65b0\u7684\u601d\u8def\u3002<\/strong> \u8fc7\u53bb\uff0c\u6211\u4eec\u53ef\u80fd\u56e0\u4e3a\u53cd\u722c\u63aa\u65bd\u800c\u671b\u800c\u5374\u6b65\uff0c\u73b0\u5728\uff0c\u6211\u4eec\u53ef\u4ee5\u66f4\u52a0\u81ea\u4fe1\u5730\u53bb\u63a2\u7d22\u6570\u636e\u7684\u4e16\u754c\u3002<\/p>\n\n\n\n<p>\u7a7f\u4e91API\u7684\u51fa\u73b0\uff0c\u65e0\u7591\u4e3a\u6570\u636e\u91c7\u96c6\u884c\u4e1a\u5e26\u6765\u4e86\u65b0\u7684\u66d9\u5149\u3002\u5b83\u4e0d\u4ec5\u5e2e\u52a9\u6211\u4eec\u7a81\u7834\u4e86\u6280\u672f\u58c1\u5792\uff0c\u66f4\u8ba9\u6211\u4eec\u80fd\u591f\u66f4\u4e13\u6ce8\u4e8e\u6570\u636e\u7684\u4ef7\u503c\u6316\u6398\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u4e3a\u4e00\u540d\u6570\u636e\u91c7\u96c6\u5de5\u4f5c\u8005\uff0c\u6211\u6df1\u77e5\u6570\u636e\u7684\u91cd\u8981\u6027\u3002\u5728\u65e5\u5e38\u5de5\u4f5c\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u4f1a\u9047\u5230\u5404\u79cd\u5404\u6837\u7684\u53cd\u722c\u63aa\u65bd\uff0c\u8fd9\u4e9b\u63aa\u65bd\u6781\u5927\u5730\u963b\u788d&#8230;<\/p>\n<p class=\"more-link-wrap\"><a href=\"https:\/\/www.cloudbypass.com\/tutorial\/6996.html\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &ldquo;\u7a7f\u4e91API\u52a9\u4f60\u6df1\u5ea6\u6316\u6398GMGN.ai\u5e02\u573a\u6570\u636e&rdquo;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":3570,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"class_list":["post-6996","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-skip-cloudflare-verification"],"_links":{"self":[{"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/posts\/6996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/comments?post=6996"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/posts\/6996\/revisions"}],"predecessor-version":[{"id":6997,"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/posts\/6996\/revisions\/6997"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/media\/3570"}],"wp:attachment":[{"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/media?parent=6996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/categories?post=6996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudbypass.com\/tutorial\/wp-json\/wp\/v2\/tags?post=6996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}