{"id":1110650,"date":"2025-01-08T17:21:41","date_gmt":"2025-01-08T09:21:41","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1110650.html"},"modified":"2025-01-08T17:21:43","modified_gmt":"2025-01-08T09:21:43","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%9c%a8%e7%bd%91%e7%bb%9c%e4%b8%8a%e7%88%ac%e5%8f%96%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1110650.html","title":{"rendered":"\u5982\u4f55\u7528python\u5728\u7f51\u7edc\u4e0a\u722c\u53d6\u6570\u636e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25073405\/8d2e5c9f-0709-4b73-8800-b7065ee6ff62.webp\" alt=\"\u5982\u4f55\u7528python\u5728\u7f51\u7edc\u4e0a\u722c\u53d6\u6570\u636e\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u5728\u7f51\u7edc\u4e0a\u722c\u53d6\u6570\u636e<\/strong>\u6d89\u53ca\u591a\u4e2a\u6b65\u9aa4\u548c\u6280\u672f\uff0c\u5305\u62ec\u9009\u62e9\u722c\u866b\u5de5\u5177\u3001\u89e3\u6790\u7f51\u9875\u3001\u5904\u7406\u6570\u636e\u7b49\u3002<strong>\u9009\u62e9\u5408\u9002\u7684\u722c\u866b\u5e93\u3001\u4e86\u89e3\u7f51\u9875\u7ed3\u6784\u3001\u4f7f\u7528\u5408\u9002\u7684\u89e3\u6790\u5668\u3001\u5904\u7406\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\u3001\u9075\u5b88\u722c\u866b\u793c\u4eea<\/strong>\u662f\u5173\u952e\u6b65\u9aa4\u3002\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u4e00\u4e2a\u91cd\u8981\u6b65\u9aa4\uff1a\u9009\u62e9\u5408\u9002\u7684\u722c\u866b\u5e93\u3002<\/p>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u722c\u866b\u5e93\u662f\u8fdb\u884c\u7f51\u7edc\u722c\u866b\u7684\u7b2c\u4e00\u6b65\u3002Python\u6709\u591a\u79cd\u5f3a\u5927\u7684\u722c\u866b\u5e93\uff0c\u5982BeautifulSoup\u3001Scrapy\u3001Selenium\u7b49\u3002\u5176\u4e2d\uff0cBeautifulSoup\u9002\u5408\u5904\u7406\u9759\u6001\u7f51\u9875\u6570\u636e\uff0cScrapy\u5219\u66f4\u9002\u5408\u590d\u6742\u7684\u722c\u53d6\u4efb\u52a1\uff0c\u800cSelenium\u53ef\u4ee5\u5904\u7406\u9700\u8981\u6a21\u62df\u7528\u6237\u64cd\u4f5c\u7684\u52a8\u6001\u7f51\u9875\u3002\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u722c\u53d6\u6548\u7387\u548c\u6210\u529f\u7387\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u9009\u62e9\u5408\u9002\u7684\u722c\u866b\u5e93<\/h3>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u722c\u866b\u5e93\u662f\u7f51\u7edc\u722c\u53d6\u6210\u529f\u7684\u57fa\u7840\u3002Python\u6709\u591a\u79cd\u5e93\u53ef\u4ee5\u4f7f\u7528\uff0c\u4e0b\u9762\u4ecb\u7ecd\u51e0\u79cd\u5e38\u7528\u7684\u722c\u866b\u5e93\u53ca\u5176\u9002\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h4>1\u3001BeautifulSoup<\/h4>\n<\/p>\n<p><p>BeautifulSoup\u662f\u4e00\u4e2a\u7528\u4e8e\u89e3\u6790HTML\u548cXML\u6587\u6863\u7684Python\u5e93\u3002\u5b83\u521b\u5efa\u4e86\u4e00\u4e2a\u89e3\u6790\u6811\uff0c\u4f9b\u4f60\u8f7b\u677e\u63d0\u53d6\u60f3\u8981\u7684\u6570\u636e\u3002BeautifulSoup\u975e\u5e38\u9002\u5408\u5904\u7406\u9759\u6001\u7f51\u9875\uff0c\u914d\u5408requests\u5e93\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u6570\u636e\u722c\u53d6\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>from bs4 import BeautifulSoup<\/p>\n<p>url = &#39;http:\/\/example.com&#39;<\/p>\n<p>response = requests.get(url)<\/p>\n<p>soup = BeautifulSoup(response.content, &#39;html.parser&#39;)<\/p>\n<h2><strong>\u63d0\u53d6\u6807\u9898<\/strong><\/h2>\n<p>title = soup.title.string<\/p>\n<p>print(title)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001Scrapy<\/h4>\n<\/p>\n<p><p>Scrapy\u662f\u4e00\u4e2a\u7528\u4e8e\u722c\u53d6\u7f51\u7ad9\u5e76\u63d0\u53d6\u7ed3\u6784\u5316\u6570\u636e\u7684\u5e94\u7528\u6846\u67b6\u3002\u5b83\u9002\u5408\u590d\u6742\u7684\u722c\u53d6\u4efb\u52a1\uff0c\u5982\u9700\u8981\u722c\u53d6\u591a\u4e2a\u9875\u9762\u3001\u5904\u7406\u8f83\u5927\u7684\u6570\u636e\u91cf\u7b49\u3002Scrapy\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u5982\u81ea\u52a8\u5904\u7406\u8bf7\u6c42\u3001\u6570\u636e\u5b58\u50a8\u7b49\uff0c\u975e\u5e38\u9002\u5408\u5927\u89c4\u6a21\u7684\u6570\u636e\u722c\u53d6\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import scrapy<\/p>\n<p>class ExampleSpider(scrapy.Spider):<\/p>\n<p>    name = &#39;example&#39;<\/p>\n<p>    start_urls = [&#39;http:\/\/example.com&#39;]<\/p>\n<p>    def parse(self, response):<\/p>\n<p>        title = response.xpath(&#39;\/\/title\/text()&#39;).get()<\/p>\n<p>        yield {&#39;title&#39;: title}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001Selenium<\/h4>\n<\/p>\n<p><p>Selenium\u662f\u4e00\u4e2a\u7528\u4e8e\u81ea\u52a8\u5316\u6d4f\u89c8\u5668\u64cd\u4f5c\u7684\u5de5\u5177\uff0c\u9002\u5408\u5904\u7406\u9700\u8981JavaScript\u6e32\u67d3\u7684\u52a8\u6001\u7f51\u9875\u3002Selenium\u53ef\u4ee5\u6a21\u62df\u7528\u6237\u64cd\u4f5c\uff0c\u5982\u70b9\u51fb\u3001\u8f93\u5165\u7b49\uff0c\u83b7\u53d6\u52a8\u6001\u52a0\u8f7d\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<p>driver = webdriver.Chrome()<\/p>\n<p>driver.get(&#39;http:\/\/example.com&#39;)<\/p>\n<h2><strong>\u63d0\u53d6\u6807\u9898<\/strong><\/h2>\n<p>title = driver.title<\/p>\n<p>print(title)<\/p>\n<p>driver.quit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4e86\u89e3\u7f51\u9875\u7ed3\u6784<\/h3>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u722c\u53d6\u6570\u636e\u4e4b\u524d\uff0c\u4e86\u89e3\u76ee\u6807\u7f51\u9875\u7684\u7ed3\u6784\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u4f7f\u7528\u6d4f\u89c8\u5668\u7684\u5f00\u53d1\u8005\u5de5\u5177\uff08\u5982Chrome\u7684\u201c\u68c0\u67e5\u5143\u7d20\u201d\u529f\u80fd\uff09\u53ef\u4ee5\u67e5\u770b\u7f51\u9875\u7684HTML\u7ed3\u6784\uff0c\u627e\u5230\u9700\u8981\u7684\u6570\u636e\u6240\u5728\u7684\u6807\u7b7e\u548c\u5c5e\u6027\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528\u5f00\u53d1\u8005\u5de5\u5177<\/h4>\n<\/p>\n<p><p>\u6253\u5f00\u76ee\u6807\u7f51\u9875\uff0c\u53f3\u952e\u70b9\u51fb\u9700\u8981\u63d0\u53d6\u7684\u6570\u636e\uff0c\u9009\u62e9\u201c\u68c0\u67e5\u5143\u7d20\u201d\uff0c\u53ef\u4ee5\u770b\u5230\u5bf9\u5e94\u7684HTML\u4ee3\u7801\u3002\u901a\u8fc7\u67e5\u770b\u4ee3\u7801\uff0c\u53ef\u4ee5\u786e\u5b9a\u6570\u636e\u6240\u5728\u7684\u6807\u7b7e\u548c\u5c5e\u6027\uff0c\u65b9\u4fbf\u540e\u7eed\u7684\u89e3\u6790\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u5206\u6790HTML\u7ed3\u6784<\/h4>\n<\/p>\n<p><p>HTML\u6587\u6863\u662f\u7531\u6807\u7b7e\u7ec4\u6210\u7684\u6811\u72b6\u7ed3\u6784\uff0c\u4e86\u89e3\u57fa\u672c\u7684HTML\u6807\u7b7e\u548c\u5c5e\u6027\uff0c\u53ef\u4ee5\u5e2e\u52a9\u66f4\u597d\u5730\u89e3\u6790\u7f51\u9875\u5185\u5bb9\u3002\u5e38\u89c1\u7684\u6807\u7b7e\u6709<code>&lt;div&gt;<\/code>, <code>&lt;span&gt;<\/code>, <code>&lt;a&gt;<\/code>\u7b49\uff0c\u901a\u8fc7\u8fd9\u4e9b\u6807\u7b7e\u548c\u5c5e\u6027\uff0c\u53ef\u4ee5\u5b9a\u4f4d\u5230\u9700\u8981\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u5408\u9002\u7684\u89e3\u6790\u5668<\/h3>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u89e3\u6790\u5668\u53ef\u4ee5\u63d0\u9ad8\u6570\u636e\u63d0\u53d6\u7684\u51c6\u786e\u6027\u548c\u6548\u7387\u3002BeautifulSoup\u652f\u6301\u591a\u79cd\u89e3\u6790\u5668\uff0c\u5982html.parser\u3001lxml\u7b49\u3002\u4e0d\u540c\u7684\u89e3\u6790\u5668\u6709\u4e0d\u540c\u7684\u6027\u80fd\u548c\u529f\u80fd\uff0c\u9009\u62e9\u5408\u9002\u7684\u89e3\u6790\u5668\u53ef\u4ee5\u63d0\u9ad8\u89e3\u6790\u6548\u7387\u3002<\/p>\n<\/p>\n<p><h4>1\u3001html.parser<\/h4>\n<\/p>\n<p><p>html.parser\u662fPython\u5185\u7f6e\u7684\u89e3\u6790\u5668\uff0c\u9002\u5408\u5904\u7406\u7b80\u5355\u7684HTML\u6587\u6863\u3002\u5b83\u4e0d\u9700\u8981\u989d\u5916\u5b89\u88c5\u5e93\uff0c\u4f7f\u7528\u65b9\u4fbf\uff0c\u4f46\u6027\u80fd\u76f8\u5bf9\u8f83\u4f4e\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">soup = BeautifulSoup(response.content, &#39;html.parser&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001lxml<\/h4>\n<\/p>\n<p><p>lxml\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684HTML\u548cXML\u89e3\u6790\u5668\uff0c\u9002\u5408\u5904\u7406\u590d\u6742\u7684HTML\u6587\u6863\u3002\u5b83\u9700\u8981\u989d\u5916\u5b89\u88c5\u5e93\uff0c\u4f46\u89e3\u6790\u901f\u5ea6\u5feb\uff0c\u529f\u80fd\u5f3a\u5927\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">soup = BeautifulSoup(response.content, &#39;lxml&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5904\u7406\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u6709\u4e9b\u7f51\u9875\u7684\u6570\u636e\u662f\u901a\u8fc7JavaScript\u5f02\u6b65\u52a0\u8f7d\u7684\uff0c\u4f20\u7edf\u7684\u9759\u6001\u722c\u866b\u65e0\u6cd5\u76f4\u63a5\u83b7\u53d6\u8fd9\u4e9b\u6570\u636e\u3002\u5904\u7406\u5f02\u6b65\u52a0\u8f7d\u7684\u6570\u636e\u9700\u8981\u4f7f\u7528Selenium\u6216\u5206\u6790\u7f51\u7edc\u8bf7\u6c42\uff0c\u83b7\u53d6\u6570\u636e\u7684API\u63a5\u53e3\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528Selenium<\/h4>\n<\/p>\n<p><p>Selenium\u53ef\u4ee5\u6a21\u62df\u7528\u6237\u64cd\u4f5c\uff0c\u7b49\u5f85\u9875\u9762\u52a0\u8f7d\u5b8c\u6210\u540e\u83b7\u53d6\u52a8\u6001\u6570\u636e\u3002\u9002\u5408\u5904\u7406\u9700\u8981\u7528\u6237\u4ea4\u4e92\u7684\u7f51\u9875\uff0c\u5982\u767b\u5f55\u3001\u6eda\u52a8\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<p>from selenium.webdriver.common.by import By<\/p>\n<p>from selenium.webdriver.support.ui import WebDriverW<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t<\/p>\n<p>from selenium.webdriver.support import expected_conditions as EC<\/p>\n<p>driver = webdriver.Chrome()<\/p>\n<p>driver.get(&#39;http:\/\/example.com&#39;)<\/p>\n<h2><strong>\u7b49\u5f85\u5143\u7d20\u52a0\u8f7d\u5b8c\u6210<\/strong><\/h2>\n<p>element = WebDriverWait(driver, 10).until(<\/p>\n<p>    EC.presence_of_element_located((By.ID, &#39;dynamic-content&#39;))<\/p>\n<p>)<\/p>\n<h2><strong>\u63d0\u53d6\u52a8\u6001\u6570\u636e<\/strong><\/h2>\n<p>data = element.text<\/p>\n<p>print(data)<\/p>\n<p>driver.quit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u5206\u6790\u7f51\u7edc\u8bf7\u6c42<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u6d4f\u89c8\u5668\u7684\u5f00\u53d1\u8005\u5de5\u5177\u53ef\u4ee5\u67e5\u770b\u7f51\u9875\u7684\u7f51\u7edc\u8bf7\u6c42\uff0c\u627e\u5230\u6570\u636e\u7684API\u63a5\u53e3\u3002\u901a\u8fc7\u6a21\u62df\u8fd9\u4e9b\u8bf7\u6c42\uff0c\u53ef\u4ee5\u76f4\u63a5\u83b7\u53d6\u6570\u636e\uff0c\u907f\u514d\u4f7f\u7528Selenium\u7684\u590d\u6742\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>url = &#39;http:\/\/example.com\/api\/data&#39;<\/p>\n<p>response = requests.get(url)<\/p>\n<h2><strong>\u89e3\u6790JSON\u6570\u636e<\/strong><\/h2>\n<p>data = response.json()<\/p>\n<p>print(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u9075\u5b88\u722c\u866b\u793c\u4eea<\/h3>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u7f51\u7edc\u722c\u53d6\u65f6\uff0c\u9075\u5b88\u722c\u866b\u793c\u4eea\u975e\u5e38\u91cd\u8981\u3002\u5408\u7406\u8bbe\u7f6e\u8bf7\u6c42\u95f4\u9694\u3001\u6a21\u62df\u7528\u6237\u884c\u4e3a\u3001\u9075\u5b88\u7f51\u7ad9\u7684robots.txt\u89c4\u5219\uff0c\u53ef\u4ee5\u907f\u514d\u5bf9\u670d\u52a1\u5668\u9020\u6210\u8fc7\u5927\u538b\u529b\uff0c\u51cf\u5c11\u88ab\u5c01\u7981\u7684\u98ce\u9669\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u8bbe\u7f6e\u8bf7\u6c42\u95f4\u9694<\/h4>\n<\/p>\n<p><p>\u9891\u7e41\u7684\u8bf7\u6c42\u4f1a\u5bf9\u670d\u52a1\u5668\u9020\u6210\u8d1f\u62c5\uff0c\u5408\u7406\u8bbe\u7f6e\u8bf7\u6c42\u95f4\u9694\u53ef\u4ee5\u51cf\u5c11\u5bf9\u670d\u52a1\u5668\u7684\u538b\u529b\u3002\u4f7f\u7528time\u5e93\u53ef\u4ee5\u8bbe\u7f6e\u8bf7\u6c42\u95f4\u9694\uff0c\u6a21\u62df\u7528\u6237\u884c\u4e3a\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import time<\/p>\n<p>for url in urls:<\/p>\n<p>    response = requests.get(url)<\/p>\n<p>    # \u5904\u7406\u6570\u636e<\/p>\n<p>    time.sleep(1)  # \u8bbe\u7f6e1\u79d2\u7684\u8bf7\u6c42\u95f4\u9694<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6a21\u62df\u7528\u6237\u884c\u4e3a<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528User-Agent\u5934\u4fe1\u606f\u53ef\u4ee5\u6a21\u62df\u4e0d\u540c\u7684\u6d4f\u89c8\u5668\uff0c\u907f\u514d\u88ab\u8bc6\u522b\u4e3a\u722c\u866b\u3002\u901a\u8fc7\u8bbe\u7f6e\u8bf7\u6c42\u5934\u4fe1\u606f\uff0c\u53ef\u4ee5\u6a21\u62df\u6b63\u5e38\u7684\u7528\u6237\u8bbf\u95ee\u884c\u4e3a\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">headers = {&#39;User-Agent&#39;: &#39;Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4472.124 Safari\/537.36&#39;}<\/p>\n<p>response = requests.get(url, headers=headers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u9075\u5b88robots.txt\u89c4\u5219<\/h4>\n<\/p>\n<p><p>robots.txt\u6587\u4ef6\u5b9a\u4e49\u4e86\u7f51\u7ad9\u5141\u8bb8\u6216\u7981\u6b62\u722c\u866b\u8bbf\u95ee\u7684\u8303\u56f4\u3002\u9075\u5b88robots.txt\u89c4\u5219\uff0c\u907f\u514d\u722c\u53d6\u88ab\u7981\u6b62\u7684\u9875\u9762\uff0c\u53ef\u4ee5\u51cf\u5c11\u88ab\u5c01\u7981\u7684\u98ce\u9669\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import urllib.robotparser<\/p>\n<p>rp = urllib.robotparser.RobotFileParser()<\/p>\n<p>rp.set_url(&#39;http:\/\/example.com\/robots.txt&#39;)<\/p>\n<p>rp.read()<\/p>\n<p>url = &#39;http:\/\/example.com\/page&#39;<\/p>\n<p>if rp.can_fetch(&#39;*&#39;, url):<\/p>\n<p>    response = requests.get(url)<\/p>\n<p>    # \u5904\u7406\u6570\u636e<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5904\u7406\u6570\u636e\u5b58\u50a8<\/h3>\n<\/p>\n<p><p>\u722c\u53d6\u5230\u7684\u6570\u636e\u9700\u8981\u8fdb\u884c\u5b58\u50a8\u548c\u5904\u7406\uff0c\u6839\u636e\u4e0d\u540c\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u9009\u62e9\u4e0d\u540c\u7684\u5b58\u50a8\u65b9\u5f0f\uff0c\u5982\u6587\u4ef6\u3001\u6570\u636e\u5e93\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5b58\u50a8\u5230\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u722c\u53d6\u7684\u6570\u636e\u53ef\u4ee5\u5b58\u50a8\u5230\u6587\u4ef6\u4e2d\uff0c\u65b9\u4fbf\u540e\u7eed\u5904\u7406\u3002\u5e38\u89c1\u7684\u6587\u4ef6\u683c\u5f0f\u6709CSV\u3001JSON\u3001TXT\u7b49\uff0c\u6839\u636e\u6570\u636e\u7ed3\u6784\u9009\u62e9\u5408\u9002\u7684\u6587\u4ef6\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import csv<\/p>\n<p>data = [{&#39;title&#39;: &#39;Example&#39;, &#39;url&#39;: &#39;http:\/\/example.com&#39;}]<\/p>\n<p>with open(&#39;data.csv&#39;, &#39;w&#39;, newline=&#39;&#39;) as file:<\/p>\n<p>    writer = csv.DictWriter(file, fieldnames=[&#39;title&#39;, &#39;url&#39;])<\/p>\n<p>    writer.writeheader()<\/p>\n<p>    writer.writerows(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u5b58\u50a8\u5230\u6570\u636e\u5e93<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u5927\u89c4\u6a21\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u9009\u62e9\u5b58\u50a8\u5230\u6570\u636e\u5e93\u4e2d\uff0c\u65b9\u4fbf\u67e5\u8be2\u548c\u5904\u7406\u3002\u5e38\u7528\u7684\u6570\u636e\u5e93\u6709MySQL\u3001MongoDB\u7b49\uff0c\u6839\u636e\u6570\u636e\u7ed3\u6784\u548c\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u6570\u636e\u5e93\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pymysql<\/p>\n<p>connection = pymysql.connect(host=&#39;localhost&#39;,<\/p>\n<p>                             user=&#39;user&#39;,<\/p>\n<p>                             password=&#39;passwd&#39;,<\/p>\n<p>                             database=&#39;db&#39;)<\/p>\n<p>data = [{&#39;title&#39;: &#39;Example&#39;, &#39;url&#39;: &#39;http:\/\/example.com&#39;}]<\/p>\n<p>with connection.cursor() as cursor:<\/p>\n<p>    for item in data:<\/p>\n<p>        sql = &quot;INSERT INTO `table` (`title`, `url`) VALUES (%s, %s)&quot;<\/p>\n<p>        cursor.execute(sql, (item[&#39;title&#39;], item[&#39;url&#39;]))<\/p>\n<p>connection.commit()<\/p>\n<p>connection.close()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u5904\u7406\u53cd\u722c\u866b\u673a\u5236<\/h3>\n<\/p>\n<p><p>\u6709\u4e9b\u7f51\u7ad9\u4f1a\u91c7\u53d6\u53cd\u722c\u866b\u673a\u5236\uff0c\u9650\u5236\u722c\u866b\u7684\u8bbf\u95ee\u3002\u5904\u7406\u53cd\u722c\u866b\u673a\u5236\u9700\u8981\u91c7\u7528\u4e00\u4e9b\u6280\u672f\u624b\u6bb5\uff0c\u5982\u4f7f\u7528\u4ee3\u7406\u3001\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528\u4ee3\u7406<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee3\u7406\u53ef\u4ee5\u9690\u85cf\u722c\u866b\u7684\u771f\u5b9eIP\uff0c\u907f\u514d\u88ab\u5c01\u7981\u3002\u901a\u8fc7\u8bbe\u7f6e\u4ee3\u7406\uff0c\u53ef\u4ee5\u6a21\u62df\u4e0d\u540c\u7684IP\u5730\u5740\uff0c\u63d0\u9ad8\u722c\u53d6\u7684\u6210\u529f\u7387\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">proxies = {<\/p>\n<p>    &#39;http&#39;: &#39;http:\/\/10.10.1.10:3128&#39;,<\/p>\n<p>    &#39;https&#39;: &#39;http:\/\/10.10.1.10:1080&#39;,<\/p>\n<p>}<\/p>\n<p>response = requests.get(url, proxies=proxies)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a<\/h4>\n<\/p>\n<p><p>\u6a21\u62df\u6d4f\u89c8\u5668\u884c\u4e3a\u53ef\u4ee5\u63d0\u9ad8\u722c\u866b\u7684\u9690\u853d\u6027\uff0c\u907f\u514d\u88ab\u8bc6\u522b\u4e3a\u722c\u866b\u3002\u901a\u8fc7\u8bbe\u7f6e\u8bf7\u6c42\u5934\u4fe1\u606f\u3001\u4f7f\u7528Selenium\u7b49\u5de5\u5177\uff0c\u53ef\u4ee5\u6a21\u62df\u6b63\u5e38\u7684\u7528\u6237\u8bbf\u95ee\u884c\u4e3a\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from selenium import webdriver<\/p>\n<p>options = webdriver.ChromeOptions()<\/p>\n<p>options.add_argument(&#39;--headless&#39;)<\/p>\n<p>options.add_argument(&#39;--disable-gpu&#39;)<\/p>\n<p>options.add_argument(&#39;--no-sandbox&#39;)<\/p>\n<p>options.add_argument(&#39;--user-agent=Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/91.0.4472.124 Safari\/537.36&#39;)<\/p>\n<p>driver = webdriver.Chrome(options=options)<\/p>\n<p>driver.get(&#39;http:\/\/example.com&#39;)<\/p>\n<h2><strong>\u63d0\u53d6\u6570\u636e<\/strong><\/h2>\n<p>data = driver.page_source<\/p>\n<p>print(data)<\/p>\n<p>driver.quit()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u6570\u636e\u6e05\u6d17\u548c\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u722c\u53d6\u5230\u7684\u6570\u636e\u901a\u5e38\u9700\u8981\u8fdb\u884c\u6e05\u6d17\u548c\u5904\u7406\uff0c\u53bb\u9664\u65e0\u7528\u4fe1\u606f\uff0c\u63d0\u53d6\u6709\u7528\u6570\u636e\u3002\u6570\u636e\u6e05\u6d17\u548c\u5904\u7406\u662f\u6570\u636e\u5206\u6790\u7684\u91cd\u8981\u6b65\u9aa4\uff0c\u76f4\u63a5\u5f71\u54cd\u5206\u6790\u7ed3\u679c\u7684\u51c6\u786e\u6027\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u6570\u636e\u6e05\u6d17<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u6e05\u6d17\u662f\u6307\u53bb\u9664\u6570\u636e\u4e2d\u7684\u65e0\u7528\u4fe1\u606f\u3001\u9519\u8bef\u6570\u636e\u7b49\u3002\u5e38\u89c1\u7684\u6570\u636e\u6e05\u6d17\u64cd\u4f5c\u6709\u53bb\u91cd\u3001\u7f3a\u5931\u503c\u5904\u7406\u3001\u683c\u5f0f\u8f6c\u6362\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>data = pd.read_csv(&#39;data.csv&#39;)<\/p>\n<h2><strong>\u53bb\u91cd<\/strong><\/h2>\n<p>data = data.drop_duplicates()<\/p>\n<h2><strong>\u7f3a\u5931\u503c\u5904\u7406<\/strong><\/h2>\n<p>data = data.fillna(&#39;N\/A&#39;)<\/p>\n<h2><strong>\u683c\u5f0f\u8f6c\u6362<\/strong><\/h2>\n<p>data[&#39;date&#39;] = pd.to_datetime(data[&#39;date&#39;])<\/p>\n<p>data.to_csv(&#39;clean_data.csv&#39;, index=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6570\u636e\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u5904\u7406\u662f\u6307\u5bf9\u6570\u636e\u8fdb\u884c\u8f6c\u6362\u3001\u805a\u5408\u7b49\u64cd\u4f5c\uff0c\u63d0\u53d6\u6709\u7528\u7684\u4fe1\u606f\u3002\u5e38\u89c1\u7684\u6570\u636e\u5904\u7406\u64cd\u4f5c\u6709\u5206\u7ec4\u3001\u7edf\u8ba1\u3001\u7b5b\u9009\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>data = pd.read_csv(&#39;clean_data.csv&#39;)<\/p>\n<h2><strong>\u5206\u7ec4\u7edf\u8ba1<\/strong><\/h2>\n<p>grouped_data = data.groupby(&#39;category&#39;).size()<\/p>\n<h2><strong>\u7b5b\u9009<\/strong><\/h2>\n<p>filtered_data = data[data[&#39;value&#39;] &gt; 100]<\/p>\n<h2><strong>\u805a\u5408<\/strong><\/h2>\n<p>aggregated_data = data.groupby(&#39;category&#39;).agg({&#39;value&#39;: &#39;sum&#39;})<\/p>\n<p>print(grouped_data)<\/p>\n<p>print(filtered_data)<\/p>\n<p>print(aggregated_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u6570\u636e\u5206\u6790\u548c\u53ef\u89c6\u5316<\/h3>\n<\/p>\n<p><p>\u6570\u636e\u5206\u6790\u548c\u53ef\u89c6\u5316\u662f\u6570\u636e\u5904\u7406\u7684\u6700\u540e\u4e00\u6b65\uff0c\u901a\u8fc7\u6570\u636e\u5206\u6790\u548c\u53ef\u89c6\u5316\uff0c\u53ef\u4ee5\u76f4\u89c2\u5730\u5c55\u793a\u6570\u636e\u7ed3\u679c\uff0c\u53d1\u73b0\u6570\u636e\u4e2d\u7684\u89c4\u5f8b\u548c\u8d8b\u52bf\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u6570\u636e\u5206\u6790<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u5206\u6790\u662f\u6307\u5bf9\u6570\u636e\u8fdb\u884c\u7edf\u8ba1\u5206\u6790\u3001\u8ba1\u7b97\u6307\u6807\u7b49\uff0c\u63d0\u53d6\u6709\u4ef7\u503c\u7684\u4fe1\u606f\u3002\u5e38\u89c1\u7684\u6570\u636e\u5206\u6790\u65b9\u6cd5\u6709\u63cf\u8ff0\u7edf\u8ba1\u3001\u76f8\u5173\u5206\u6790\u3001\u56de\u5f52\u5206\u6790\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>data = pd.read_csv(&#39;clean_data.csv&#39;)<\/p>\n<h2><strong>\u63cf\u8ff0\u7edf\u8ba1<\/strong><\/h2>\n<p>descriptive_stats = data.describe()<\/p>\n<h2><strong>\u76f8\u5173\u5206\u6790<\/strong><\/h2>\n<p>correlation_matrix = data.corr()<\/p>\n<p>print(descriptive_stats)<\/p>\n<p>print(correlation_matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u6570\u636e\u53ef\u89c6\u5316<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u53ef\u89c6\u5316\u662f\u6307\u901a\u8fc7\u56fe\u8868\u7b49\u65b9\u5f0f\u76f4\u89c2\u5730\u5c55\u793a\u6570\u636e\u7ed3\u679c\u3002\u5e38\u89c1\u7684\u53ef\u89c6\u5316\u5de5\u5177\u6709matplotlib\u3001seaborn\u7b49\uff0c\u53ef\u4ee5\u7ed8\u5236\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\uff0c\u5982\u6298\u7ebf\u56fe\u3001\u67f1\u72b6\u56fe\u3001\u6563\u70b9\u56fe\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>import seaborn as sns<\/p>\n<p>import pandas as pd<\/p>\n<p>data = pd.read_csv(&#39;clean_data.csv&#39;)<\/p>\n<h2><strong>\u6298\u7ebf\u56fe<\/strong><\/h2>\n<p>plt.figure(figsize=(10, 6))<\/p>\n<p>plt.plot(data[&#39;date&#39;], data[&#39;value&#39;])<\/p>\n<p>plt.xlabel(&#39;Date&#39;)<\/p>\n<p>plt.ylabel(&#39;Value&#39;)<\/p>\n<p>plt.title(&#39;Value over Time&#39;)<\/p>\n<p>plt.show()<\/p>\n<h2><strong>\u67f1\u72b6\u56fe<\/strong><\/h2>\n<p>plt.figure(figsize=(10, 6))<\/p>\n<p>sns.barplot(x=&#39;category&#39;, y=&#39;value&#39;, data=data)<\/p>\n<p>plt.xlabel(&#39;Category&#39;)<\/p>\n<p>plt.ylabel(&#39;Value&#39;)<\/p>\n<p>plt.title(&#39;Value by Category&#39;)<\/p>\n<p>plt.show()<\/p>\n<h2><strong>\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>plt.figure(figsize=(10, 6))<\/p>\n<p>sns.scatterplot(x=&#39;value1&#39;, y=&#39;value2&#39;, data=data)<\/p>\n<p>plt.xlabel(&#39;Value 1&#39;)<\/p>\n<p>plt.ylabel(&#39;Value 2&#39;)<\/p>\n<p>plt.title(&#39;Value 1 vs Value 2&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u53ef\u4ee5\u7cfb\u7edf\u5730\u5b8c\u6210\u6570\u636e\u722c\u53d6\u3001\u6e05\u6d17\u3001\u5904\u7406\u3001\u5206\u6790\u548c\u53ef\u89c6\u5316\u7684\u5168\u8fc7\u7a0b\u3002\u6ce8\u610f\uff0c\u8fdb\u884c\u7f51\u7edc\u722c\u53d6\u65f6\u5e94\u9075\u5b88\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u548c\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\uff0c\u5408\u7406\u4f7f\u7528\u722c\u866b\u6280\u672f\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5f00\u59cb\u4f7f\u7528Python\u8fdb\u884c\u7f51\u7edc\u722c\u866b\uff1f<\/strong><br \/>\u8981\u5f00\u59cb\u4f7f\u7528Python\u8fdb\u884c\u7f51\u7edc\u722c\u866b\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u57fa\u672c\u7684\u5e93\uff0c\u6bd4\u5982<code>requests<\/code>\u548c<code>BeautifulSoup<\/code>\u3002\u8fd9\u4e9b\u5e93\u53ef\u4ee5\u5e2e\u52a9\u60a8\u53d1\u9001HTTP\u8bf7\u6c42\u5e76\u89e3\u6790\u7f51\u9875\u5185\u5bb9\u3002\u5b89\u88c5\u8fd9\u4e9b\u5e93\u540e\uff0c\u60a8\u53ef\u4ee5\u7f16\u5199\u4ee3\u7801\u6765\u83b7\u53d6\u7f51\u9875\u6570\u636e\uff0c\u5e76\u4f7f\u7528\u89e3\u6790\u5e93\u63d0\u53d6\u6240\u9700\u7684\u4fe1\u606f\u3002<\/p>\n<p><strong>\u5728\u722c\u53d6\u6570\u636e\u65f6\uff0c\u5982\u4f55\u5904\u7406\u53cd\u722c\u866b\u673a\u5236\uff1f<\/strong><br \/>\u8bb8\u591a\u7f51\u7ad9\u4f1a\u91c7\u53d6\u53cd\u722c\u866b\u63aa\u65bd\u6765\u4fdd\u62a4\u5176\u6570\u636e\uff0c\u5e38\u89c1\u7684\u5305\u62ecIP\u5c01\u7981\u3001\u9a8c\u8bc1\u7801\u548c\u7528\u6237\u4ee3\u7406\u68c0\u6d4b\u3002\u4e3a\u4e86\u7ed5\u8fc7\u8fd9\u4e9b\u673a\u5236\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee3\u7406IP\u3001\u8bbe\u7f6e\u5408\u7406\u7684\u8bf7\u6c42\u95f4\u9694\u3001\u4f2a\u88c5\u7528\u6237\u4ee3\u7406\uff0c\u751a\u81f3\u4f7f\u7528\u81ea\u52a8\u5316\u5de5\u5177\u5982Selenium\u6765\u6a21\u62df\u4eba\u7c7b\u884c\u4e3a\u3002\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u60a8\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u89c4\u907f\u53cd\u722c\u866b\u7b56\u7565\u3002<\/p>\n<p><strong>\u5982\u4f55\u786e\u4fdd\u722c\u53d6\u6570\u636e\u7684\u5408\u6cd5\u6027\u4e0e\u9053\u5fb7\u6027\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u6570\u636e\u722c\u53d6\u4e4b\u524d\uff0c\u52a1\u5fc5\u68c0\u67e5\u76ee\u6807\u7f51\u7ad9\u7684<code>robots.txt<\/code>\u6587\u4ef6\uff0c\u4e86\u89e3\u5176\u5141\u8bb8\u548c\u7981\u6b62\u722c\u53d6\u7684\u5185\u5bb9\u3002\u6b64\u5916\uff0c\u9075\u5faa\u7f51\u7ad9\u7684\u4f7f\u7528\u6761\u6b3e\uff0c\u907f\u514d\u5bf9\u7f51\u7ad9\u9020\u6210\u8d1f\u62c5\u6216\u5f71\u54cd\u5176\u6b63\u5e38\u8fd0\u884c\u3002\u5728\u722c\u53d6\u6570\u636e\u65f6\uff0c\u5c3d\u91cf\u9075\u5faa\u9053\u5fb7\u6807\u51c6\uff0c\u907f\u514d\u4fb5\u72af\u4ed6\u4eba\u7684\u77e5\u8bc6\u4ea7\u6743\u6216\u9690\u79c1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u5728\u7f51\u7edc\u4e0a\u722c\u53d6\u6570\u636e\u6d89\u53ca\u591a\u4e2a\u6b65\u9aa4\u548c\u6280\u672f\uff0c\u5305\u62ec\u9009\u62e9\u722c\u866b\u5de5\u5177\u3001\u89e3\u6790\u7f51\u9875\u3001\u5904\u7406\u6570\u636e\u7b49\u3002\u9009\u62e9\u5408\u9002\u7684\u722c\u866b\u5e93\u3001 [&hellip;]","protected":false},"author":3,"featured_media":1110662,"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\/1110650"}],"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=1110650"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1110650\/revisions"}],"predecessor-version":[{"id":1110665,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1110650\/revisions\/1110665"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1110662"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1110650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1110650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1110650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}