{"id":1022508,"date":"2024-12-27T13:35:12","date_gmt":"2024-12-27T05:35:12","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1022508.html"},"modified":"2024-12-27T13:35:15","modified_gmt":"2024-12-27T05:35:15","slug":"python%e4%b8%ad%e5%a6%82%e4%bd%95%e4%b8%8b%e8%bd%bd%e9%9f%b3%e4%b9%90","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1022508.html","title":{"rendered":"python\u4e2d\u5982\u4f55\u4e0b\u8f7d\u97f3\u4e50"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25164918\/038dc2b0-7b6e-4105-a655-f63ae29f7f7e.webp\" alt=\"python\u4e2d\u5982\u4f55\u4e0b\u8f7d\u97f3\u4e50\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u4e0b\u8f7d\u97f3\u4e50\u7684\u64cd\u4f5c\uff0c\u4e3b\u8981\u6d89\u53ca\u5230<strong>\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u3001\u5229\u7528API\u3001\u89e3\u6790\u7f51\u9875<\/strong>\u7b49\u65b9\u5f0f\u3002\u6bcf\u79cd\u65b9\u5f0f\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u52bf\u548c\u4f7f\u7528\u573a\u666f\u3002<strong>\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<\/strong>\u662f\u6700\u7b80\u5355\u7684\u65b9\u5f0f\uff0c\u56e0\u4e3a\u5f88\u591a\u5e93\u5df2\u7ecf\u5c01\u88c5\u597d\u4e86\u4e0b\u8f7d\u529f\u80fd\uff1b<strong>\u5229\u7528API<\/strong>\u5219\u9002\u5408\u9700\u8981\u66f4\u9ad8\u5b9a\u5236\u5316\u7684\u573a\u666f\uff1b<strong>\u89e3\u6790\u7f51\u9875<\/strong>\u5219\u662f\u5e94\u5bf9\u67d0\u4e9b\u6ca1\u6709\u516c\u5f00API\u7684\u5e73\u53f0\u7684\u597d\u65b9\u6cd5\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\u4e2d\u7684\u4e00\u79cd\uff1a\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<\/p>\n<\/p>\n<p><p>Python\u7684\u7b2c\u4e09\u65b9\u5e93\u4f7f\u5f97\u4e0b\u8f7d\u97f3\u4e50\u53d8\u5f97\u7b80\u5355\u800c\u9ad8\u6548\u3002\u5176\u4e2d\uff0cpytube\u662f\u4e00\u4e2a\u975e\u5e38\u53d7\u6b22\u8fce\u7684\u5e93\uff0c\u4e13\u7528\u4e8e\u4e0b\u8f7dYouTube\u89c6\u9891\u548c\u97f3\u9891\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5\u548c\u914d\u7f6epytube<\/strong><\/li>\n<\/ol>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5pytube\u5e93\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7Python\u7684\u5305\u7ba1\u7406\u5de5\u5177pip\u6765\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pytube<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8cpytube\u540e\uff0c\u4f60\u9700\u8981\u5bfc\u5165\u8be5\u5e93\u5e76\u8fdb\u884c\u57fa\u672c\u914d\u7f6e\u3002\u4f7f\u7528pytube\u4e0b\u8f7d\u97f3\u9891\u7684\u8fc7\u7a0b\u5176\u5b9e\u5c31\u662f\u4e0b\u8f7d\u89c6\u9891\u5e76\u63d0\u53d6\u97f3\u9891\u7684\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4e0b\u8f7dYouTube\u89c6\u9891\u4e2d\u7684\u97f3\u9891<\/strong><\/li>\n<\/ol>\n<p><p>\u4f7f\u7528pytube\u4e0b\u8f7d\u97f3\u9891\u975e\u5e38\u7b80\u5355\u3002\u9996\u5148\uff0c\u4f60\u9700\u8981\u627e\u5230\u4f60\u60f3\u4e0b\u8f7d\u7684YouTube\u89c6\u9891\u7684URL\u3002\u7136\u540e\uff0c\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u4e0b\u8f7d\u97f3\u9891\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pytube import YouTube<\/p>\n<h2><strong>\u8f93\u5165\u89c6\u9891\u7684URL<\/strong><\/h2>\n<p>video_url = &#39;https:\/\/www.youtube.com\/watch?v=example&#39;<\/p>\n<h2><strong>\u521b\u5efaYouTube\u5bf9\u8c61<\/strong><\/h2>\n<p>yt = YouTube(video_url)<\/p>\n<h2><strong>\u9009\u62e9\u6700\u4f73\u97f3\u9891\u6d41<\/strong><\/h2>\n<p>audio_stream = yt.streams.filter(only_audio=True).first()<\/p>\n<h2><strong>\u4e0b\u8f7d\u97f3\u9891<\/strong><\/h2>\n<p>audio_stream.download(output_path=&#39;.&#39;, filename=&#39;audio.mp4&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u4ee3\u7801\u4f1a\u4e0b\u8f7d\u97f3\u9891\u5e76\u4fdd\u5b58\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\uff0c\u5e76\u547d\u540d\u4e3aaudio.mp4\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u683c\u5f0f\u8f6c\u6362<\/strong><\/li>\n<\/ol>\n<p><p>\u7531\u4e8e\u4e0b\u8f7d\u4e0b\u6765\u7684\u97f3\u9891\u6587\u4ef6\u901a\u5e38\u662fmp4\u683c\u5f0f\uff0c\u5982\u679c\u9700\u8981\u5c06\u5176\u8f6c\u6362\u4e3amp3\u683c\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528ffmpeg\u5de5\u5177\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86ffmpeg\uff0c\u7136\u540e\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u8f6c\u6362\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">ffmpeg -i audio.mp4 -q:a 0 -map a audio.mp3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6837\uff0c\u4f60\u5c31\u5f97\u5230\u4e86\u4e00\u4e2amp3\u683c\u5f0f\u7684\u97f3\u9891\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u5229\u7528API<\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u97f3\u4e50\u5e73\u53f0\u63d0\u4f9b\u4e86\u516c\u5f00\u7684API\uff0c\u53ef\u4ee5\u7528\u4e8e\u4e0b\u8f7d\u97f3\u4e50\u3002\u4f7f\u7528API\u7684\u597d\u5904\u662f\u80fd\u591f\u83b7\u5f97\u66f4\u9ad8\u7684\u5b9a\u5236\u6027\uff0c\u5e76\u4e14\u53ef\u4ee5\u81ea\u52a8\u5904\u7406\u4e00\u4e9b\u590d\u6742\u7684\u7ec6\u8282\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u9009\u62e9\u5408\u9002\u7684API<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u9009\u62e9API\u65f6\uff0c\u4f60\u9700\u8981\u8003\u8651\u5e73\u53f0\u7684\u652f\u6301\u3001API\u7684\u529f\u80fd\u3001\u4ee5\u53ca\u4f7f\u7528\u7684\u4fbf\u6377\u6027\u3002\u4f8b\u5982\uff0c\u67d0\u4e9b\u97f3\u4e50\u5e73\u53f0\u7684API\u53ef\u80fd\u53ea\u652f\u6301\u8bd5\u542c\uff0c\u800c\u4e0d\u652f\u6301\u4e0b\u8f7d\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u8003\u8651\u5176\u4ed6\u5e73\u53f0\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u83b7\u53d6API\u5bc6\u94a5<\/strong><\/li>\n<\/ol>\n<p><p>\u5f88\u591aAPI\u90fd\u9700\u8981\u4f7f\u7528API\u5bc6\u94a5\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1\u3002\u901a\u5e38\uff0c\u4f60\u9700\u8981\u5728\u5f00\u53d1\u8005\u95e8\u6237\u7f51\u7ad9\u4e0a\u6ce8\u518c\u4e00\u4e2a\u5f00\u53d1\u8005\u8d26\u53f7\uff0c\u7136\u540e\u521b\u5efa\u4e00\u4e2a\u9879\u76ee\u4ee5\u83b7\u5f97API\u5bc6\u94a5\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u4f7f\u7528API\u4e0b\u8f7d\u97f3\u4e50<\/strong><\/li>\n<\/ol>\n<p><p>\u4e00\u65e6\u83b7\u5f97\u4e86API\u5bc6\u94a5\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528requests\u5e93\u8bbf\u95eeAPI\u5e76\u4e0b\u8f7d\u97f3\u4e50\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<h2><strong>API\u7684\u57fa\u672c\u4fe1\u606f<\/strong><\/h2>\n<p>api_url = &#39;https:\/\/api.musicplatform.com\/v1\/tracks&#39;<\/p>\n<p>api_key = &#39;your_api_key&#39;<\/p>\n<h2><strong>\u6784\u5efa\u8bf7\u6c42\u5934<\/strong><\/h2>\n<p>headers = {<\/p>\n<p>    &#39;Authorization&#39;: f&#39;Bearer {api_key}&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u8bf7\u6c42\u97f3\u4e50\u6570\u636e<\/strong><\/h2>\n<p>response = requests.get(api_url, headers=headers)<\/p>\n<h2><strong>\u89e3\u6790\u5e76\u4e0b\u8f7d\u97f3\u4e50<\/strong><\/h2>\n<p>if response.status_code == 200:<\/p>\n<p>    music_data = response.json()<\/p>\n<p>    for track in music_data[&#39;tracks&#39;]:<\/p>\n<p>        track_url = track[&#39;url&#39;]<\/p>\n<p>        track_name = track[&#39;name&#39;]<\/p>\n<p>        track_response = requests.get(track_url)<\/p>\n<p>        with open(f&#39;{track_name}.mp3&#39;, &#39;wb&#39;) as f:<\/p>\n<p>            f.write(track_response.content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u89e3\u6790\u7f51\u9875<\/p>\n<\/p>\n<p><p>\u5f53\u6211\u4eec\u65e0\u6cd5\u901a\u8fc7API\u83b7\u53d6\u97f3\u4e50\u65f6\uff0c\u89e3\u6790\u7f51\u9875\u662f\u4e00\u4e2a\u53ef\u884c\u7684\u66ff\u4ee3\u65b9\u6848\u3002\u901a\u8fc7\u89e3\u6790\u7f51\u9875\uff0c\u6211\u4eec\u53ef\u4ee5\u6a21\u62df\u7528\u6237\u884c\u4e3a\uff0c\u76f4\u63a5\u4ece\u7f51\u9875\u4e2d\u63d0\u53d6\u97f3\u4e50\u6587\u4ef6\u7684\u4e0b\u8f7d\u94fe\u63a5\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177<\/strong><\/li>\n<\/ol>\n<p><p>Python\u6709\u5f88\u591a\u4f18\u79c0\u7684\u7f51\u9875\u89e3\u6790\u5e93\uff0c\u6bd4\u5982BeautifulSoup\u548cSelenium\u3002BeautifulSoup\u9002\u5408\u89e3\u6790\u9759\u6001\u7f51\u9875\uff0c\u800cSelenium\u5219\u53ef\u4ee5\u5904\u7406\u52a8\u6001\u7f51\u9875\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u89e3\u6790\u7f51\u9875\u5e76\u4e0b\u8f7d\u97f3\u4e50<\/strong><\/li>\n<\/ol>\n<p><p>\u4f7f\u7528BeautifulSoup\u89e3\u6790\u7f51\u9875\u7684\u57fa\u672c\u6d41\u7a0b\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bs4 import BeautifulSoup<\/p>\n<p>import requests<\/p>\n<h2><strong>\u8bf7\u6c42\u7f51\u9875\u5185\u5bb9<\/strong><\/h2>\n<p>url = &#39;https:\/\/www.musicwebsite.com\/track\/123&#39;<\/p>\n<p>response = requests.get(url)<\/p>\n<h2><strong>\u89e3\u6790\u7f51\u9875\u5185\u5bb9<\/strong><\/h2>\n<p>soup = BeautifulSoup(response.content, &#39;html.parser&#39;)<\/p>\n<h2><strong>\u627e\u5230\u97f3\u4e50\u4e0b\u8f7d\u94fe\u63a5<\/strong><\/h2>\n<p>audio_url = soup.find(&#39;a&#39;, {&#39;class&#39;: &#39;download-link&#39;})[&#39;href&#39;]<\/p>\n<h2><strong>\u4e0b\u8f7d\u97f3\u4e50<\/strong><\/h2>\n<p>audio_response = requests.get(audio_url)<\/p>\n<p>with open(&#39;track.mp3&#39;, &#39;wb&#39;) as f:<\/p>\n<p>    f.write(audio_response.content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u9875\u9762\u662f\u52a8\u6001\u52a0\u8f7d\u7684\uff0c\u53ef\u4ee5\u4f7f\u7528Selenium\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\uff0c\u4ece\u800c\u83b7\u53d6\u9700\u8981\u7684\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u6ce8\u610f\u4e8b\u9879<\/p>\n<\/p>\n<ol>\n<li><strong>\u7248\u6743\u548c\u6cd5\u5f8b\u95ee\u9898<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u4e0b\u8f7d\u97f3\u4e50\u4e4b\u524d\uff0c\u52a1\u5fc5\u786e\u4fdd\u9075\u5b88\u76f8\u5173\u7684\u6cd5\u5f8b\u6cd5\u89c4\u548c\u5e73\u53f0\u7684\u4f7f\u7528\u6761\u6b3e\u3002\u672a\u7ecf\u6388\u6743\u7684\u4e0b\u8f7d\u548c\u5206\u53d1\u97f3\u4e50\u53ef\u80fd\u4f1a\u4fb5\u72af\u7248\u6743\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4e0b\u8f7d\u901f\u5ea6\u548c\u7a33\u5b9a\u6027<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u4f7f\u7528\u7a0b\u5e8f\u6279\u91cf\u4e0b\u8f7d\u97f3\u4e50\u65f6\uff0c\u6ce8\u610f\u63a7\u5236\u4e0b\u8f7d\u901f\u5ea6\u4ee5\u907f\u514d\u5bf9\u670d\u52a1\u5668\u9020\u6210\u8fc7\u5927\u8d1f\u8f7d\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u8003\u8651\u5b9e\u73b0\u65ad\u70b9\u7eed\u4f20\u529f\u80fd\uff0c\u63d0\u9ad8\u4e0b\u8f7d\u7684\u7a33\u5b9a\u6027\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u6587\u4ef6\u683c\u5f0f\u548c\u97f3\u8d28<\/strong><\/li>\n<\/ol>\n<p><p>\u4e0d\u540c\u7684\u4e0b\u8f7d\u65b9\u6cd5\u53ef\u80fd\u4f1a\u5f97\u5230\u4e0d\u540c\u683c\u5f0f\u548c\u97f3\u8d28\u7684\u97f3\u9891\u6587\u4ef6\u3002\u5728\u9009\u62e9\u4e0b\u8f7d\u65b9\u6cd5\u65f6\uff0c\u6743\u8861\u6587\u4ef6\u5927\u5c0f\u548c\u97f3\u8d28\u4e4b\u95f4\u7684\u5173\u7cfb\u662f\u5fc5\u8981\u7684\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u4e0b\u8f7d\u97f3\u4e50\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u4f60\u7684\u5177\u4f53\u9700\u6c42\u548c\u6280\u672f\u80cc\u666f\u3002<strong>\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<\/strong>\u662f\u6700\u7b80\u5355\u7684\u65b9\u5f0f\uff0c\u800c<strong>\u5229\u7528API<\/strong>\u548c<strong>\u89e3\u6790\u7f51\u9875<\/strong>\u5219\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7684\u7075\u6d3b\u6027\u3002\u5728\u5b9e\u73b0\u8fd9\u4e9b\u65b9\u6cd5\u65f6\uff0c\u59cb\u7ec8\u8981\u6ce8\u610f\u7248\u6743\u548c\u6cd5\u5f8b\u95ee\u9898\uff0c\u786e\u4fdd\u4f60\u7684\u64cd\u4f5c\u662f\u5408\u6cd5\u5408\u89c4\u7684\u3002\u901a\u8fc7\u4e0d\u65ad\u5b66\u4e60\u548c\u5b9e\u8df5\uff0c\u4f60\u53ef\u4ee5\u638c\u63e1\u66f4\u591a\u7684\u6280\u5de7\u548c\u5de5\u5177\uff0c\u63d0\u5347\u81ea\u5df1\u7684\u7f16\u7a0b\u80fd\u529b\u548c\u89e3\u51b3\u95ee\u9898\u7684\u80fd\u529b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u4e0b\u8f7d\u5728\u7ebf\u97f3\u4e50\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528requests\u5e93\u7ed3\u5408BeautifulSoup\u6216\u5176\u4ed6\u7f51\u9875\u89e3\u6790\u5e93\u6765\u6293\u53d6\u97f3\u4e50\u6587\u4ef6\u7684\u4e0b\u8f7d\u94fe\u63a5\u3002\u901a\u8fc7\u83b7\u53d6\u7f51\u9875\u4e2d\u97f3\u4e50\u7684URL\uff0c\u7136\u540e\u4f7f\u7528requests\u5e93\u4e0b\u8f7d\u8be5\u6587\u4ef6\u5373\u53ef\u3002\u786e\u4fdd\u9075\u5faa\u76f8\u5173\u7684\u7248\u6743\u6cd5\u89c4\uff0c\u4e0b\u8f7d\u5408\u6cd5\u6388\u6743\u7684\u97f3\u4e50\u3002<\/p>\n<p><strong>Python\u6709\u54ea\u4e9b\u5e93\u53ef\u4ee5\u5e2e\u52a9\u4e0b\u8f7d\u97f3\u4e50\u6587\u4ef6\uff1f<\/strong><br \/>\u6709\u51e0\u4e2aPython\u5e93\u53ef\u4ee5\u5e2e\u52a9\u4e0b\u8f7d\u97f3\u4e50\u6587\u4ef6\uff0c\u5305\u62ecrequests\u3001urllib\u3001\u548cpydub\u7b49\u3002requests\u5e93\u7528\u4e8e\u53d1\u9001\u7f51\u7edc\u8bf7\u6c42\u5e76\u4e0b\u8f7d\u6587\u4ef6\uff0curllib\u5219\u63d0\u4f9b\u4e86\u66f4\u5e95\u5c42\u7684\u7f51\u7edc\u64cd\u4f5c\uff0c\u800cpydub\u5219\u7528\u4e8e\u5904\u7406\u97f3\u9891\u6587\u4ef6\uff0c\u65b9\u4fbf\u8fdb\u884c\u683c\u5f0f\u8f6c\u6362\u548c\u97f3\u9891\u526a\u8f91\u3002<\/p>\n<p><strong>\u4e0b\u8f7d\u97f3\u4e50\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u6cd5\u5f8b\u95ee\u9898\uff1f<\/strong><br \/>\u5728\u4e0b\u8f7d\u97f3\u4e50\u65f6\uff0c\u52a1\u5fc5\u4e86\u89e3\u7248\u6743\u6cd5\u5f8b\u548c\u76f8\u5173\u6761\u6b3e\u3002\u5f88\u591a\u97f3\u4e50\u4f5c\u54c1\u53d7\u5230\u7248\u6743\u4fdd\u62a4\uff0c\u672a\u83b7\u5f97\u6388\u6743\u4e0b\u8f7d\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6cd5\u5f8b\u8d23\u4efb\u3002\u5efa\u8bae\u4f18\u5148\u9009\u62e9\u90a3\u4e9b\u63d0\u4f9b\u514d\u8d39\u4e0b\u8f7d\u6216\u5df2\u83b7\u5f97\u6388\u6743\u7684\u97f3\u4e50\u8d44\u6e90\uff0c\u6216\u4f7f\u7528\u5408\u6cd5\u7684\u97f3\u4e50\u6d41\u5a92\u4f53\u670d\u52a1API\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u4e0b\u8f7d\u97f3\u4e50\u7684\u64cd\u4f5c\uff0c\u4e3b\u8981\u6d89\u53ca\u5230\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u3001\u5229\u7528API\u3001\u89e3\u6790\u7f51\u9875\u7b49\u65b9\u5f0f\u3002\u6bcf\u79cd\u65b9\u5f0f\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u52bf\u548c [&hellip;]","protected":false},"author":3,"featured_media":1022513,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1022508"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1022508"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1022508\/revisions"}],"predecessor-version":[{"id":1022516,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1022508\/revisions\/1022516"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1022513"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1022508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1022508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1022508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}