{"id":1036601,"date":"2024-12-31T12:08:15","date_gmt":"2024-12-31T04:08:15","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1036601.html"},"modified":"2024-12-31T12:08:17","modified_gmt":"2024-12-31T04:08:17","slug":"python3%e5%a6%82%e4%bd%95%e5%ae%9e%e6%97%b6%e7%88%ac%e5%8f%96%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1036601.html","title":{"rendered":"python3\u5982\u4f55\u5b9e\u65f6\u722c\u53d6\u6570\u636e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/8ca20cba-ded3-4345-99ec-d55a27f86fe8.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python3\u5982\u4f55\u5b9e\u65f6\u722c\u53d6\u6570\u636e\" \/><\/p>\n<p><p> \u5b9e\u65f6\u722c\u53d6\u6570\u636e\u662f\u4e00\u9879\u9700\u8981\u5904\u7406\u5927\u91cf\u52a8\u6001\u5185\u5bb9\u548c\u5feb\u901f\u66f4\u65b0\u7684\u4efb\u52a1\u3002<strong>\u5728Python3\u4e2d\u8fdb\u884c\u5b9e\u65f6\u6570\u636e\u722c\u53d6\u53ef\u4ee5\u4f7f\u7528\u591a\u7ebf\u7a0b\u3001\u591a\u8fdb\u7a0b\u3001\u5f02\u6b65\u7f16\u7a0b\u3001\u8f6e\u8be2\u673a\u5236\u7b49\u65b9\u6cd5<\/strong>\u3002\u5176\u4e2d\uff0c<strong>\u5f02\u6b65\u7f16\u7a0b<\/strong>\u662f\u8f83\u4e3a\u9ad8\u6548\u7684\u4e00\u79cd\u65b9\u5f0f\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u5728\u4e0d\u963b\u585e\u4e3b\u7ebf\u7a0b\u7684\u60c5\u51b5\u4e0b\u8fdb\u884c\u5e76\u53d1\u8bf7\u6c42\uff0c\u4ece\u800c\u63d0\u9ad8\u722c\u53d6\u901f\u5ea6\u548c\u5b9e\u65f6\u6027\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5f02\u6b65\u7f16\u7a0b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u5f02\u6b65\u7f16\u7a0b\u7684\u57fa\u672c\u6982\u5ff5<\/h2>\n<\/p>\n<p><p>\u5f02\u6b65\u7f16\u7a0b\u662f\u4e00\u79cd\u7f16\u7a0b\u8303\u5f0f\uff0c\u5b83\u5141\u8bb8\u7a0b\u5e8f\u5728\u7b49\u5f85\u67d0\u4e9b\u64cd\u4f5c\uff08\u5982I\/O\u64cd\u4f5c\uff09\u65f6\u4e0d\u963b\u585e\uff0c\u4ece\u800c\u53ef\u4ee5\u5728\u7b49\u5f85\u671f\u95f4\u6267\u884c\u5176\u4ed6\u64cd\u4f5c\u3002\u5728Python\u4e2d\uff0c\u5f02\u6b65\u7f16\u7a0b\u4e3b\u8981\u901a\u8fc7<code>asyncio<\/code>\u5e93\u6765\u5b9e\u73b0\u3002\u901a\u8fc7\u4f7f\u7528<code>async<\/code>\u548c<code>aw<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t<\/code>\u5173\u952e\u5b57\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u5f02\u6b65\u51fd\u6570\uff0c\u5e76\u4f7f\u7528\u4e8b\u4ef6\u5faa\u73af\u6765\u8c03\u5ea6\u548c\u6267\u884c\u8fd9\u4e9b\u51fd\u6570\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u4f7f\u7528<code>aiohttp<\/code>\u8fdb\u884c\u5f02\u6b65HTTP\u8bf7\u6c42<\/h2>\n<\/p>\n<p><p><code>aiohttp<\/code>\u662f\u4e00\u4e2a\u57fa\u4e8e<code>asyncio<\/code>\u7684\u5f02\u6b65HTTP\u5ba2\u6237\u7aef\uff0c\u53ef\u4ee5\u7528\u6765\u53d1\u9001\u5f02\u6b65HTTP\u8bf7\u6c42\u3002\u76f8\u6bd4\u4f20\u7edf\u7684\u540c\u6b65\u8bf7\u6c42\u5e93\uff0c<code>aiohttp<\/code>\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u722c\u53d6\u901f\u5ea6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528<code>aiohttp<\/code>\u8fdb\u884c\u5f02\u6b65HTTP\u8bf7\u6c42\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import asyncio<\/p>\n<p>import aiohttp<\/p>\n<p>async def fetch(url):<\/p>\n<p>    async with aiohttp.ClientSession() as session:<\/p>\n<p>        async with session.get(url) as response:<\/p>\n<p>            return await response.text()<\/p>\n<p>async def main(urls):<\/p>\n<p>    tasks = [fetch(url) for url in urls]<\/p>\n<p>    results = await asyncio.gather(*tasks)<\/p>\n<p>    return results<\/p>\n<p>urls = [&#39;http:\/\/example.com&#39;, &#39;http:\/\/example.org&#39;, &#39;http:\/\/example.net&#39;]<\/p>\n<p>loop = asyncio.get_event_loop()<\/p>\n<p>results = loop.run_until_complete(main(urls))<\/p>\n<p>for result in results:<\/p>\n<p>    print(result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5f02\u6b65\u51fd\u6570<code>fetch<\/code>\u6765\u53d1\u9001HTTP\u8bf7\u6c42\uff0c\u5e76\u4f7f\u7528<code>asyncio.gather<\/code>\u6765\u5e76\u53d1\u6267\u884c\u591a\u4e2a\u8bf7\u6c42\u3002<\/p>\n<\/p>\n<p><h2>\u4e09\u3001\u5904\u7406\u5b9e\u65f6\u6570\u636e<\/h2>\n<\/p>\n<p><p>\u5b9e\u65f6\u722c\u53d6\u6570\u636e\u65f6\uff0c\u901a\u5e38\u9700\u8981\u5904\u7406\u52a8\u6001\u5185\u5bb9\u548c\u5feb\u901f\u53d8\u5316\u7684\u6570\u636e\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\uff1a<\/p>\n<\/p>\n<p><h3>1\u3001\u8f6e\u8be2\u673a\u5236<\/h3>\n<\/p>\n<p><p>\u8f6e\u8be2\u673a\u5236\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u5b9e\u65f6\u6570\u636e\u83b7\u53d6\u65b9\u5f0f\uff0c\u5b83\u901a\u8fc7\u5b9a\u671f\u53d1\u9001\u8bf7\u6c42\u6765\u83b7\u53d6\u6700\u65b0\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>async def poll(url, interval):<\/p>\n<p>    while True:<\/p>\n<p>        data = await fetch(url)<\/p>\n<p>        print(data)<\/p>\n<p>        await asyncio.sleep(interval)<\/p>\n<p>url = &#39;http:\/\/example.com&#39;<\/p>\n<p>interval = 5  # \u6bcf5\u79d2\u8f6e\u8be2\u4e00\u6b21<\/p>\n<p>loop.run_until_complete(poll(url, interval))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5f02\u6b65\u51fd\u6570<code>poll<\/code>\u6765\u5b9a\u671f\u53d1\u9001\u8bf7\u6c42\uff0c\u5e76\u6253\u5370\u83b7\u53d6\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h3>2\u3001WebSocket<\/h3>\n<\/p>\n<p><p>WebSocket\u662f\u4e00\u79cd\u5168\u53cc\u5de5\u901a\u4fe1\u534f\u8bae\uff0c\u5141\u8bb8\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u8fdb\u884c\u5b9e\u65f6\u6570\u636e\u4f20\u8f93\u3002<code>websockets<\/code>\u662f\u4e00\u4e2a\u7528\u4e8eWebSocket\u901a\u4fe1\u7684Python\u5e93\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528<code>websockets<\/code>\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import asyncio<\/p>\n<p>import websockets<\/p>\n<p>async def listen(uri):<\/p>\n<p>    async with websockets.connect(uri) as websocket:<\/p>\n<p>        while True:<\/p>\n<p>            message = await websocket.recv()<\/p>\n<p>            print(message)<\/p>\n<p>uri = &#39;ws:\/\/example.com\/socket&#39;<\/p>\n<p>loop.run_until_complete(listen(uri))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5f02\u6b65\u51fd\u6570<code>listen<\/code>\u6765\u8fde\u63a5WebSocket\u670d\u52a1\u5668\uff0c\u5e76\u6301\u7eed\u63a5\u6536\u548c\u6253\u5370\u6d88\u606f\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u6570\u636e\u5b58\u50a8\u548c\u5904\u7406<\/h2>\n<\/p>\n<p><p>\u5728\u5b9e\u65f6\u722c\u53d6\u6570\u636e\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6570\u636e\u5b58\u50a8\u548c\u5904\u7406\u4e5f\u662f\u4e00\u4e2a\u91cd\u8981\u73af\u8282\u3002\u53ef\u4ee5\u4f7f\u7528\u6570\u636e\u5e93\uff08\u5982MySQL\u3001PostgreSQL\u3001MongoDB\uff09\u6765\u5b58\u50a8\u722c\u53d6\u7684\u6570\u636e\uff0c\u5e76\u4f7f\u7528\u6570\u636e\u5904\u7406\u5e93\uff08\u5982pandas\uff09\u6765\u8fdb\u884c\u6570\u636e\u5206\u6790\u548c\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u4f7f\u7528\u6570\u636e\u5e93\u5b58\u50a8\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5c06\u722c\u53d6\u7684\u6570\u636e\u5b58\u50a8\u5230MySQL\u6570\u636e\u5e93\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import aiomysql<\/p>\n<p>async def save_to_db(data):<\/p>\n<p>    conn = await aiomysql.connect(host=&#39;localhost&#39;, port=3306, user=&#39;user&#39;, password=&#39;password&#39;, db=&#39;database&#39;)<\/p>\n<p>    async with conn.cursor() as cursor:<\/p>\n<p>        await cursor.execute(&quot;INSERT INTO table (column) VALUES (%s)&quot;, (data,))<\/p>\n<p>        await conn.commit()<\/p>\n<p>    conn.close()<\/p>\n<p>async def main(urls):<\/p>\n<p>    tasks = [fetch(url) for url in urls]<\/p>\n<p>    results = await asyncio.gather(*tasks)<\/p>\n<p>    for result in results:<\/p>\n<p>        await save_to_db(result)<\/p>\n<p>loop.run_until_complete(main(urls))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528<code>aiomysql<\/code>\u5e93\u6765\u5f02\u6b65\u8fde\u63a5MySQL\u6570\u636e\u5e93\uff0c\u5e76\u5c06\u722c\u53d6\u7684\u6570\u636e\u63d2\u5165\u5230\u6570\u636e\u5e93\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>2\u3001\u6570\u636e\u5904\u7406\u548c\u5206\u6790<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>pandas<\/code>\u5e93\u6765\u5904\u7406\u548c\u5206\u6790\u722c\u53d6\u7684\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>data = {<\/p>\n<p>    &#39;url&#39;: urls,<\/p>\n<p>    &#39;content&#39;: results<\/p>\n<p>}<\/p>\n<p>df = pd.DataFrame(data)<\/p>\n<p>print(df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u722c\u53d6\u7684\u6570\u636e\u5b58\u50a8\u5230\u4e00\u4e2a<code>DataFrame<\/code>\u4e2d\uff0c\u5e76\u6253\u5370\u51fa\u6765\u3002<\/p>\n<\/p>\n<p><h2>\u4e94\u3001\u9519\u8bef\u5904\u7406\u548c\u91cd\u8bd5\u673a\u5236<\/h2>\n<\/p>\n<p><p>\u5728\u5b9e\u65f6\u722c\u53d6\u6570\u636e\u7684\u8fc7\u7a0b\u4e2d\uff0c\u96be\u514d\u4f1a\u9047\u5230\u7f51\u7edc\u9519\u8bef\u3001\u670d\u52a1\u5668\u9519\u8bef\u7b49\u95ee\u9898\u3002\u4e3a\u4e86\u4fdd\u8bc1\u722c\u53d6\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u9760\u6027\uff0c\u9700\u8981\u8fdb\u884c\u9519\u8bef\u5904\u7406\u548c\u91cd\u8bd5\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">async def fetch_with_retry(url, retries=3):<\/p>\n<p>    for i in range(retries):<\/p>\n<p>        try:<\/p>\n<p>            return await fetch(url)<\/p>\n<p>        except Exception as e:<\/p>\n<p>            print(f&quot;Error fetching {url}: {e}&quot;)<\/p>\n<p>            if i &lt; retries - 1:<\/p>\n<p>                await asyncio.sleep(2  i)<\/p>\n<p>            else:<\/p>\n<p>                raise<\/p>\n<p>async def main(urls):<\/p>\n<p>    tasks = [fetch_with_retry(url) for url in urls]<\/p>\n<p>    results = await asyncio.gather(*tasks, return_exceptions=True)<\/p>\n<p>    return results<\/p>\n<p>results = loop.run_until_complete(main(urls))<\/p>\n<p>for result in results:<\/p>\n<p>    if isinstance(result, Exception):<\/p>\n<p>        print(f&quot;Failed to fetch: {result}&quot;)<\/p>\n<p>    else:<\/p>\n<p>        print(result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u5e26\u91cd\u8bd5\u673a\u5236\u7684<code>fetch_with_retry<\/code>\u51fd\u6570\uff0c\u5e76\u5728\u53d1\u751f\u9519\u8bef\u65f6\u8fdb\u884c\u6307\u6570\u9000\u907f\u91cd\u8bd5\u3002<\/p>\n<\/p>\n<p><h2>\u516d\u3001\u603b\u7ed3<\/h2>\n<\/p>\n<p><p>\u5b9e\u65f6\u722c\u53d6\u6570\u636e\u662f\u4e00\u9879\u590d\u6742\u7684\u4efb\u52a1\uff0c\u9700\u8981\u7efc\u5408\u8fd0\u7528\u591a\u7ebf\u7a0b\u3001\u591a\u8fdb\u7a0b\u3001\u5f02\u6b65\u7f16\u7a0b\u3001\u8f6e\u8be2\u673a\u5236\u3001WebSocket\u7b49\u6280\u672f\u3002\u5728Python3\u4e2d\uff0c<code>asyncio<\/code>\u5e93\u548c<code>aiohttp<\/code>\u5e93\u4e3a\u5f02\u6b65\u7f16\u7a0b\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u652f\u6301\uff0c\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u722c\u53d6\u901f\u5ea6\u548c\u5b9e\u65f6\u6027\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8fd8\u9700\u8981\u7ed3\u5408\u6570\u636e\u5e93\u8fdb\u884c\u6570\u636e\u5b58\u50a8\uff0c\u4f7f\u7528\u6570\u636e\u5904\u7406\u5e93\u8fdb\u884c\u5206\u6790\uff0c\u5e76\u8fdb\u884c\u9519\u8bef\u5904\u7406\u548c\u91cd\u8bd5\uff0c\u4ee5\u4fdd\u8bc1\u722c\u53d6\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u9760\u6027\u3002\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u53ef\u4ee5\u9ad8\u6548\u5730\u5b9e\u73b0\u5b9e\u65f6\u6570\u636e\u722c\u53d6\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python3\u8fdb\u884c\u5b9e\u65f6\u6570\u636e\u722c\u53d6\uff1f<\/strong><br \/>\u5b9e\u65f6\u6570\u636e\u722c\u53d6\u901a\u5e38\u9700\u8981\u7ed3\u5408\u7f51\u7edc\u8bf7\u6c42\u5e93\u548c\u5f02\u6b65\u7f16\u7a0b\u3002\u53ef\u4ee5\u4f7f\u7528<code>requests<\/code>\u5e93\u8fdb\u884c\u6570\u636e\u83b7\u53d6\uff0c\u7ed3\u5408<code>asyncio<\/code>\u548c<code>aiohttp<\/code>\u5e93\u5b9e\u73b0\u5f02\u6b65\u722c\u53d6\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u5728\u77ed\u65f6\u95f4\u5185\u6293\u53d6\u5927\u91cf\u6570\u636e\uff0c\u63d0\u9ad8\u6548\u7387\u3002\u786e\u4fdd\u9075\u5faa\u7f51\u7ad9\u7684robots.txt\u6587\u4ef6\u4e2d\u7684\u722c\u53d6\u89c4\u5219\u3002<\/p>\n<p><strong>\u5728\u5b9e\u65f6\u722c\u53d6\u6570\u636e\u65f6\uff0c\u5982\u4f55\u5904\u7406\u53cd\u722c\u866b\u673a\u5236\uff1f<\/strong><br \/>\u53cd\u722c\u866b\u673a\u5236\u53ef\u80fd\u4f1a\u5bfc\u81f4\u8bf7\u6c42\u88ab\u963b\u6b62\u6216\u6570\u636e\u83b7\u53d6\u5931\u8d25\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee3\u7406IP\u6765\u9690\u85cf\u771f\u5b9e\u5730\u5740\uff0c\u8bbe\u7f6e\u8bf7\u6c42\u5934\uff08\u5982User-Agent\uff09\u6a21\u4eff\u6d4f\u89c8\u5668\u8bf7\u6c42\uff0c\u751a\u81f3\u4f7f\u7528\u6d4f\u89c8\u5668\u81ea\u52a8\u5316\u5de5\u5177\u5982Selenium\u8fdb\u884c\u6570\u636e\u6293\u53d6\u3002\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u6709\u6548\u51cf\u5c11\u88ab\u5c01\u7981\u7684\u98ce\u9669\u3002<\/p>\n<p><strong>\u5982\u4f55\u5b58\u50a8\u5b9e\u65f6\u722c\u53d6\u7684\u6570\u636e\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u5b9e\u65f6\u6570\u636e\u722c\u53d6\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9\u591a\u79cd\u5b58\u50a8\u65b9\u5f0f\u3002\u5e38\u89c1\u7684\u9009\u62e9\u5305\u62ec\u5c06\u6570\u636e\u5b58\u50a8\u5728CSV\u6587\u4ef6\u4e2d\u3001\u4f7f\u7528SQLite\u6570\u636e\u5e93\u6216MongoDB\u8fdb\u884c\u66f4\u590d\u6742\u7684\u6570\u636e\u5b58\u50a8\u548c\u67e5\u8be2\u3002\u9009\u62e9\u5b58\u50a8\u65b9\u5f0f\u65f6\uff0c\u5e94\u8003\u8651\u6570\u636e\u7684\u5927\u5c0f\u3001\u7ed3\u6784\u548c\u540e\u7eed\u5904\u7406\u9700\u6c42\u3002\u4f7f\u7528\u5408\u9002\u7684\u5b58\u50a8\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u6570\u636e\u8bbf\u95ee\u7684\u6548\u7387\u548c\u7075\u6d3b\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5b9e\u65f6\u722c\u53d6\u6570\u636e\u662f\u4e00\u9879\u9700\u8981\u5904\u7406\u5927\u91cf\u52a8\u6001\u5185\u5bb9\u548c\u5feb\u901f\u66f4\u65b0\u7684\u4efb\u52a1\u3002\u5728Python3\u4e2d\u8fdb\u884c\u5b9e\u65f6\u6570\u636e\u722c\u53d6\u53ef\u4ee5\u4f7f\u7528\u591a\u7ebf\u7a0b\u3001\u591a\u8fdb [&hellip;]","protected":false},"author":3,"featured_media":1036605,"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\/1036601"}],"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=1036601"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1036601\/revisions"}],"predecessor-version":[{"id":1036606,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1036601\/revisions\/1036606"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1036605"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1036601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1036601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1036601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}