{"id":53436,"date":"2024-12-03T14:16:38","date_gmt":"2024-12-03T06:16:38","guid":{"rendered":"https:\/\/fwq.ai\/blog\/53436\/"},"modified":"2024-12-03T14:16:38","modified_gmt":"2024-12-03T06:16:38","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-python-%e6%9b%bf%e6%8d%a2-html-%e5%ad%97%e7%ac%a6%e4%b8%b2%e4%b8%ad%e7%9a%84%e7%89%b9%e5%ae%9a%e5%86%85%e5%ae%b9%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/53436\/","title":{"rendered":"\u5982\u4f55\u4f7f\u7528 Python \u66ff\u6362 HTML \u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u5185\u5bb9\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u4f7f\u7528 Python \u66ff\u6362 HTML \u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u5185\u5bb9\uff1f <\/h1>\n<p><span style=\"font-size: 15px\">\u5b66\u4e60\u77e5\u8bc6\u8981\u5584\u4e8e\u601d\u8003\uff0c\u601d\u8003\uff0c\u518d\u601d\u8003\uff01\u4eca\u5929\u7c73\u4e91\u5c0f\u7f16\u5c31\u7ed9\u5927\u5bb6\u5e26\u6765<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300a\u5982\u4f55\u4f7f\u7528 Python \u66ff\u6362 HTML \u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u5185\u5bb9\uff1f \u300b<\/span>\uff0c\u4ee5\u4e0b\u5185\u5bb9\u4e3b\u8981\u5305\u542b<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u4f60\u6b63\u5728\u5b66\u4e60\u6216\u51c6\u5907\u5b66\u4e60<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\uff0c\u5c31\u90fd\u4e0d\u8981\u9519\u8fc7\u672c\u6587\u5566~\u8ba9\u6211\u4eec\u4e00\u8d77\u6765\u770b\u770b\u5427\uff0c\u80fd\u5e2e\u52a9\u5230\u4f60\u5c31\u66f4\u597d\u4e86\uff01<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241130\/1732950222674ab8ce04195.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u4f7f\u7528 Python \u66ff\u6362 HTML \u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u5185\u5bb9\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u4f7f\u7528 Python \u66ff\u6362 HTML \u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u5185\u5bb9\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u66ff\u6362\u7279\u5b9a HTML \u5b57\u7b26\u4e32\u5185\u5bb9<\/strong><\/p>\n<p>\u6709\u4e00\u4e2a\u5b57\u7b26\u4e32\u9700\u8981\u66ff\u6362\u5176\u4e2d\u7684 HTML \u5185\u5bb9\u3002\u5b57\u7b26\u4e32\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;\n&lt;meta charset=\"utf-8\"&gt;\n&lt;meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0\"&gt;\n&lt;meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\"&gt;\n&lt;link rel=\"stylesheet\" href=\"\/\/test.baidu.com\/533fb44\/umi.10d72219.css\"&gt;\n&lt;script&gt;window.publicPath = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || \"\/\/test.baidu.com\/533fb44\/\";&lt;\/script&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;div id=\"root\"&gt;&lt;\/div&gt;\n&lt;script src=\"\/\/test.baidu.com\/533fb44\/umi.b271d884.js\" entry=\"\"&gt;&lt;\/script&gt;\n\n&lt;\/body&gt;&lt;\/html&gt;<\/pre>\n<p>\u9700\u8981\u5c06\u4ee5\u4e0b HTML \u5185\u5bb9\uff1a<\/p>\n<pre>&lt;script&gt;window.publicPath = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || \"\/\/test.baidu.com\/533fb44\/\";&lt;\/script&gt;<\/pre>\n<p>\u66ff\u6362\u4e3a\uff1a<\/p>\n<pre>&lt;script&gt;window.publicPath = \"\/\/test.baidu.com\/533fb44\/\";&lt;\/script&gt;<\/pre>\n<p>\u53ef\u4ee5\u4f7f\u7528 Python \u7684 str.replace() \u65b9\u6cd5\u8fdb\u884c\u66ff\u6362\uff1a<\/p>\n<pre>str = str.replace('window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || ', '')<\/pre>\n<p>\u672c\u7bc7\u5173\u4e8e\u300a\u5982\u4f55\u4f7f\u7528 Python \u66ff\u6362 HTML \u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u5185\u5bb9\uff1f \u300b\u7684\u4ecb\u7ecd\u5c31\u5230\u6b64\u7ed3\u675f\u5566\uff0c\u4f46\u662f\u5b66\u65e0\u6b62\u5883\uff0c\u60f3\u8981\u4e86\u89e3\u5b66\u4e60\u66f4\u591a\u5173\u4e8e\u6587\u7ae0\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u8bf7\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff01<\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   \u5b66\u4e60 Typescript \u7684\u65c5\u7a0b\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4f7f\u7528 Python \u66ff\u6362 HTML \u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u5185\u5bb9\uff1f \u5b66\u4e60\u77e5\u8bc6\u8981\u5584\u4e8e\u601d\u8003\uff0c\u601d\u8003\uff0c\u518d\u601d\u8003\uff01\u4eca\u5929\u7c73\u4e91\u5c0f\u7f16\u5c31\u7ed9\u5927\u5bb6\u5e26\u6765\u300a\u5982\u4f55\u4f7f\u7528 Python \u66ff\u6362 HTML \u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u5185\u5bb9\uff1f \u300b\uff0c\u4ee5\u4e0b\u5185\u5bb9\u4e3b\u8981\u5305\u542b\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u4f60\u6b63\u5728\u5b66\u4e60\u6216\u51c6\u5907\u5b66\u4e60\u6587\u7ae0\uff0c\u5c31\u90fd\u4e0d\u8981\u9519\u8fc7\u672c\u6587\u5566~\u8ba9\u6211\u4eec\u4e00\u8d77\u6765\u770b\u770b\u5427\uff0c\u80fd\u5e2e\u52a9\u5230\u4f60\u5c31\u66f4\u597d\u4e86\uff01 \u66ff\u6362\u7279\u5b9a HTML \u5b57\u7b26\u4e32\u5185\u5bb9 \u6709\u4e00\u4e2a\u5b57\u7b26\u4e32\u9700\u8981\u66ff\u6362\u5176\u4e2d\u7684 HTML \u5185\u5bb9\u3002\u5b57\u7b26\u4e32\u5982\u4e0b\uff1a &lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt; &lt;meta charset=&#8221;utf-8&#8243;&gt; &lt;meta name=&#8221;viewport&#8221; content=&#8221;width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0&#8243;&gt; &lt;meta http-equiv=&#8221;X-UA-Compatible&#8221; content=&#8221;ie=edge&#8221;&gt; &lt;link rel=&#8221;stylesheet&#8221; href=&#8221;\/\/test.baidu.com\/533fb44\/umi.10d72219.css&#8221;&gt; &lt;script&gt;window.publicPath = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || &#8220;\/\/test.baidu.com\/533fb44\/&#8221;;&lt;\/script&gt; &lt;\/head&gt; &lt;body&gt; &lt;div id=&#8221;root&#8221;&gt;&lt;\/div&gt; &lt;script src=&#8221;\/\/test.baidu.com\/533fb44\/umi.b271d884.js&#8221; entry=&#8221;&#8221;&gt;&lt;\/script&gt; &lt;\/body&gt;&lt;\/html&gt; \u9700\u8981\u5c06\u4ee5\u4e0b HTML \u5185\u5bb9\uff1a &lt;script&gt;window.publicPath = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || &#8220;\/\/test.baidu.com\/533fb44\/&#8221;;&lt;\/script&gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-53436","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=53436"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/53436\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=53436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=53436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=53436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}