{"id":10006041,"date":"2022-07-28T17:52:54","date_gmt":"2022-07-28T09:52:54","guid":{"rendered":"https:\/\/ityet.com\/?p=10006041"},"modified":"2022-07-28T17:52:54","modified_gmt":"2022-07-28T09:52:54","slug":"%e4%b8%80%e9%a6%96%e6%ad%8c%e7%9a%84%e6%97%b6%e9%97%b4%ef%bc%8c%e6%89%8b%e6%8a%8a%e6%89%8b%e6%90%ad%e5%bb%ba%e5%9f%ba%e4%ba%8efc%e7%9a%84%e7%bd%91%e7%ab%99","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006041","title":{"rendered":"\u4e00\u9996\u6b4c\u7684\u65f6\u95f4\uff0c\u624b\u628a\u624b\u642d\u5efa\u57fa\u4e8eFC\u7684\u7f51\u7ad9"},"content":{"rendered":"<p>\u7b80\u4ecb\uff1a\u00a0\u4e0d\u662f\u6770\u4f26\u7684\u90a3\u4e00\u9996\u6b4c\u5566~\u90e8\u7f72\u7f51\u7ad9 \u8bf4\u597d\u4e0d\u54ed\u00a0\u5728\u63a5\u89e6serverless\u67b6\u6784\u4e4b\u524d\uff0c\u6211\u4eec\u5982\u679c\u60f3\u5b9e\u73b0\u4e0a\u7ebf\u4e00\u4e2aWeb\u7f51\u7ad9\uff0c\u5c31\u8981\u5728\u5f00\u53d1\u524d\u671f\u7ecf\u8fc7\u64cd\u4f5c\u5f88\u591a\u5197\u6742\u4f46\u53c8\u5fc5\u987b\u7684\u6b65\u9aa4\uff0c\u4e0d\u5c11\u5c0f\u767d\u53ef\u8c13\u662f\u5feb\u901f\u7684\u4ece\u5165\u95e8\u5230\u9000\u5751\u3002\u00a0\u7f16\u5199\u4ee3\u7801\uff0c\u90e8\u7f72\u5e94\u7528\uff0c\u90e8\u7f72\u6570\u636e\u5e93\uff0c\u7533\u8bf7\u57df\u540d\uff0c\u7533\u8bf7SSL\u8bc1\u4e66\uff0c\u57df\u540d\u5907\u6848\uff0c\u5230\u6700\u7ec8\u4e0a\u7ebf\u8d77\u7801\u8981\u51e0\u5929\u65f6\u95f4\u3002\uff08\u5728\u963f\u91cc\u4e91\u4e0a\u7533\u8bf7\u81ea\u52a9\u5907\u6848\uff0c\u5feb\u7684\u7ba1\u5c40\u53ef\u80fd\u9700\u8981\u4e00\u5230\u4e24\u5468\u5b8c\u6210\u5168\u90e8\u5907\u6848\u6d41\u7a0b\uff09\u00a0\u5373\u4f7f\u662f\u4f7f\u7528\u5bb9\u5668\u5316\u5927\u5e45\u51cf\u5c11\u8fd0\u7ef4\u548c\u7f16\u6392\u5de5\u4f5c\uff0c\u90a3\u4e5f\u4f1a\u9762\u4e34\u4e0d\u517c\u5bb9\u548c\u4e0d\u7a33\u5b9a\u7684\u60c5\u51b5\u3002\u00a0\u5982\u4e0b\u56fe\uff0c\u4e00\u4e2a\u4f60\u4ee5\u4e3a\u5f88\u201c\u7a33\u5b9a\u201c\u7684\u5bb9\u5668\uff0c\u53ef\u80fd\u4f1a\u6709\u51fa\u4e4e\u610f\u6599\u7684\u73af\u5883\u9519\u8bef\uff08ps\uff1a\u6211\u8fd9\u6b21\u4f7f\u7528\u8bed\u96c0\u7f16\u8f91\u5668\u4e0a\u4f20\u52a8\u56fegif\u62a5\u9519\u4e86\uff0c\u6240\u4ee5\u53ea\u80fd\u5d4c\u5165HTML\u4ee3\u7801\u4f7f\u7528\u5916\u90e8\u56fe\u5e8a\u4e86\uff09<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237192\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u00a0\u800c\u4e14\uff0c\u5728\u6280\u672f\u4e4b\u5916\uff0c\u4f60\u4f1a\u53d1\u73b0\u670d\u52a1\u5668\u3001\u57df\u540d\u3001\u8bc1\u4e66\u52a0\u8d77\u6765\u5c31\u662f\u4e00\u7b14\u4e0d\u83f2\u7684\u5f00\u9500\uff08\u5feb\u6765\u53c2\u52a0\u963f\u91cc\u4e91\u65b0\u7528\u6237\u98de\u5929\u4f1a\u5458\u6d3b\u52a8\uff01\uff09\uff0c\u5728\u6709\u4e86\u5efa\u4e2a\u4eba\u7ad9\u7684\u6253\u7b97\u4e4b\u540e\u4e5f\u53ef\u80fd\u88ab\u4ef7\u683c\u529d\u9000\u3002\u00a0Serverless\uff08server +\u200e -less\uff09\uff0c\u987e\u540d\u601d\u4e49\u2014\u2014\u201c\u65e0\u670d\u52a1\u5668\u201d\u3002\u4f46\u5b83\u4e0d\u662f\u771f\u6b63\u7684\u4e0d\u7528\u670d\u52a1\u5668\u8bbe\u65bd\uff0c\u66f4\u8d34\u5207\u7684\u662f\u65e0\u4f20\u7edf\u670d\u52a1\u5668\u67b6\u6784\u7684\u90a3\u4e9b\u70e6\u607c\u3002\u6211\u4ee5\u4e2a\u4eba\u7ad9\u957f\u7684\u89c6\u89d2\uff0c\u5e26\u5927\u5bb6\u7b80\u5355\u7684\u4f53\u9a8c\u4e0b\u4f7f\u7528\u963f\u91cc\u4e91Serverless\u4ea7\u54c1\u2014\u2014\u51fd\u6570\u8ba1\u7b97FC\u6765\u5f00\u53d1\u7f51\u7ad9\u7684\u5177\u4f53\u6d41\u7a0b\u3002\u770b\u770b\u901a\u8fc7\u5b9e\u64cd\u6765\u611f\u53d7Serverless\u67b6\u6784\u7684\u771f\u5b9e\u4f7f\u7528\u4f53\u9a8c\u3002\u00a0\u6211\u662f\u5982\u6b64\u76f8\u4fe1 Serverless\u00a0\u6839\u636e\u4e3b\u6d41\u91ca\u4e49\uff0cServerless\u4e0d\u662f\u8868\u793a\u6ca1\u6709\u670d\u52a1\u5668\uff0c\u800c\u8868\u793a\u5f53\u60a8\u5728\u4f7f\u7528 Serverless \u65f6\uff0c\u60a8\u65e0\u9700\u5173\u5fc3\u5e95\u5c42\u8d44\u6e90\uff0c\u4e5f\u65e0\u9700\u767b\u5f55\u670d\u52a1\u5668\u548c\u4f18\u5316\u670d\u52a1\u5668\uff0c\u53ea\u9700\u5173\u6ce8\u6700\u6838\u5fc3\u7684\u4ee3\u7801\u7247\u6bb5\uff0c\u5373\u53ef\u8df3\u8fc7\u590d\u6742\u7684\u3001\u7e41\u7410\u7684\u57fa\u672c\u5de5\u4f5c\u3002\u6838\u5fc3\u7684\u4ee3\u7801\u7247\u6bb5\u5b8c\u5168\u7531\u4e8b\u4ef6\u6216\u8005\u8bf7\u6c42\u89e6\u53d1\uff0c\u5e73\u53f0\u6839\u636e\u8bf7\u6c42\u81ea\u52a8\u5e73\u884c\u8c03\u6574\u670d\u52a1\u8d44\u6e90\u3002Serverless \u62e5\u6709\u8fd1\u4e4e\u65e0\u9650\u7684\u6269\u5bb9\u80fd\u529b\uff0c\u7a7a\u95f2\u65f6\uff0c\u4e0d\u8fd0\u884c\u4efb\u4f55\u8d44\u6e90\u3002\u4ee3\u7801\u8fd0\u884c\u65e0\u72b6\u6001\uff0c\u53ef\u4ee5\u8f7b\u6613\u5b9e\u73b0\u5feb\u901f\u8fed\u4ee3\u3001\u6781\u901f\u90e8\u7f72\u3002\u5b83\u7684\u5927\u81f4\u6267\u884c\u6d41\u7a0b\u5982\u4e0b\u56fe\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237193\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u56fe\u7247\u6765\u6e90\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=8QeHJc1t3xeLFOD2%2BRciHQ%3D%3D.0TFxRTeYErxJS60FA7OJ1kolfYTneZKgorj2Q8VNQTXONiwslgrvrF8KN2zYjMqv2GQQwZ0B9pT4y6bcBXrxTw%3D%3D\" rel=\"nofollow\">https:\/\/help.aliyun.com\/docum&#8230;<\/a>\u00a0\u6240\u4ee5\uff0cServerless\u5176\u5b9e\u662f\u5bf9\u4f20\u7edf\u4e91\u4e0a\u67b6\u6784\u7684\u9769\u65b0\uff0c\u5f00\u53d1\u8005\u53ea\u9700\u8981\u7f16\u5199\u6700\u6838\u5fc3\u7684\u4ee3\u7801\uff0c\u6bd4\u5982\u4e00\u4e2a\u8bf7\u6c42\u8fc7\u6765\u5982\u4f55\u5904\u7406\u548c\u8fd4\u56de\u5bf9\u5e94\u7684\u6570\u636e\u3002\u5176\u4ed6\u7684\u8f6f\u786c\u4ef6\u670d\u52a1\u5668\u90e8\u7f72\u76f8\u5173\u7684\u4e8b\u60c5\uff0c\u90fd\u4ea4\u7ed9\u4e91\u670d\u52a1\u5546\u3002\u8fd9\u8282\u7701\u4e86\u5927\u91cf\u8d44\u6e90\uff0c\u4ec5\u6709\u670d\u52a1\u88ab\u4f7f\u7528\u65f6\uff08\u6bd4\u5982\u7f51\u7ad9\u88ab\u8bbf\u95ee\uff09\uff0c\u624d\u4f1a\u8ba1\u7b97\u8d44\u6e90\u6d88\u8017\uff0c\u5927\u5e45\u5ea6\u964d\u4f4e\u4e86\u6210\u672c\u3002\u5e76\u4e14\u5177\u6709\u65e0\u9650\u65e0\u611f\u6269\u5bb9\u7684\u80fd\u529b\uff0c\u518d\u4e5f\u4e0d\u7528\u62c5\u5fc3\u8bbf\u95ee\u91cf\u8fc7\u5927\u670d\u52a1\u5668\u5b95\u673a\u3002\u00a0\u4e5f\u8bb8\u4f60\u53ea\u662f\u60f3\u642d\u5efa\u4e00\u4e2a\u535a\u5ba2\uff0c\u4ee5\u524d\u53ef\u80fd\u9700\u8981\u4e70\u4e00\u5e74\u7684\u670d\u52a1\u5668\uff0c\u8d77\u7801\u4e00\u5e74\u5f00\u9500\u51e0\u767e\u5143\u3002\u4f7f\u7528\u963f\u91cc\u4e91\u51fd\u6570\u8ba1\u7b97FC\uff0c\u5982\u679c\u4f60\u7684\u7f51\u7ad9\u8bbf\u95ee\u91cf\u5e76\u4e0d\u662f\u5f88\u9ad8\uff0c\u53ef\u80fd\u4e00\u5e74\u53ea\u8981\u82b1\u8d39\u5341\u51e0\u5757\u94b1\uff0c\u751a\u81f3\u5728\u6bcf\u4e2a\u6708\u7684\u514d\u8d39\u989d\u5ea6\u7684\u52a0\u6301\u4e4b\u4e0b\u4f60\u53ef\u4ee5\u51e0\u4e4e\u4e0d\u82b1\u94b1\uff01\u00a0\u90e8\u7f72\u7f51\u7ad9 \u7b80\u5355\u70b9\u00a0\u6211\u4eec\u6253\u5f00\u963f\u91cc\u4e91\u51fd\u6570\u8ba1\u7b97FC\u63a7\u5236\u53f0\u9875\u9762\uff0c\u521d\u6b21\u4f7f\u7528\u4f60\u9700\u8981\u5f00\u901a\u670d\u52a1\u5e76\u5b8c\u6210RAM\u6388\u6743\uff0c\u8fd9\u4e0d\u7528\u62c5\u5fc3\uff0c\u8ddf\u7740\u6d41\u7a0b\u4e0b\u4e00\u6b65\u5373\u53ef\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=hscKvZoXX1mtRGoC9eyRyQ%3D%3D.dm1K3wspKvXUFgfYae16c4RXRi2NHNhRW9GtPqUfxs9DI4A%2BROe92a0Qtbmrk04C\" rel=\"nofollow\">https:\/\/fcnext.console.aliyun&#8230;<\/a>\u00a0\u8fd9\u662f\u4f7f\u7528FC\u4f7f\u7528\u7684\u6d41\u7a0b\u56fe\uff0c\u4f60\u53ef\u4ee5\u6e05\u6670\u7684\u770b\u5230\u4e0a\u7ebf\u4e00\u4e2aWeb\u670d\u52a1\u6709\u90a3\u4e9b\u6b65\u9aa4\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237194\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u00a0\u9996\u5148\uff0c\u6211\u4eec\u70b9\u51fb\u5de6\u4fa7\u5bfc\u822a\u680f\uff0c\u8fdb\u5165\u5e94\u7528\u5b50\u9875\u9762\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237195\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u9009\u62e9Flask\u5e94\u7528\u6a21\u677f\u6848\u4f8b\uff1aFlask\u662f\u4e00\u4e2a\u4f7f\u7528 Python \u7f16\u5199\u7684\u8f7b\u91cf\u7ea7 Web \u5e94\u7528\u6846\u67b6\u3002\u5176 WSGI \u5de5\u5177\u7bb1\u91c7\u7528 Werkzeug \uff0c\u6a21\u677f\u5f15\u64ce\u5219\u4f7f\u7528 Jinja2 \u3002Flask\u4f7f\u7528 BSD \u6388\u6743\u3002<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237196\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u00a0\u5e94\u7528\u90e8\u7f72\u5efa\u8bae\u4f7f\u7528\u4ed3\u5e93\u90e8\u7f72\uff0c\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\u5c06\u4f1aPush \u4ee3\u7801\u5230\u60a8\u6307\u5b9a\u7684\u4ee3\u7801\u4ed3\u5e93\u4e2d\uff0c\u7136\u540e\u89e6\u53d1\u6d41\u6c34\u7ebf\u90e8\u7f72\uff1b\u540e\u671f\u66f4\u65b0\u9879\u76ee\u65f6\uff0c\u53ef\u4ee5\u76f4\u63a5\u5c06\u4ee3\u7801Push \u5230\u8fdc\u7a0b\u4ed3\u5e93\u8fdb\u884c\u5b89\u5168\u53d1\u5e03\uff0c\u603b\u4f53\u66f4\u52a0\u7075\u6d3b\u53ef\u63a7\u3002\u00a0\u4f7f\u7528\u8fd9\u79cd\u65b9\u5f0f\u9700\u8981\u7ed1\u5b9a\u4ed3\u5e93\u8d26\u6237\u4fe1\u606f\u3002<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237197\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u00a0\u9664\u4e86\u4ed3\u5e93\u6388\u6743\uff0c\u5728\u8fd9\u91cc\u4f60\u8fd8\u53ef\u4ee5\u8bbe\u7f6e\u4e00\u4e9b\u6709\u5173\u90e8\u7f72\u7684\u57fa\u672c\u4fe1\u606f\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4e0b\u4e00\u6b65\uff0c\u6211\u5c31\u662f\u8fd9\u6837\u505a\u7684\u3002<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237198\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u00a0\u5927\u6982\u7b49\u5f8515\u79d2\uff0c\u4e00\u4e2aServerless\u670d\u52a1\u5c31\u521b\u5efa\u90e8\u7f72\u5b8c\u6210\u4e86\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237199\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u00a0\u6b64\u65f6\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728\u57fa\u672c\u4fe1\u606f\u4e2d\u8bbf\u95ee\u51fd\u6570\u8ba1\u7b97\u63d0\u4f9b\u7684\u57df\u540d\u6765\u8bbf\u95ee\u9ed8\u8ba4\u7ad9\u70b9\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237200\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u5230\u8fd9\u91cc\u5176\u5b9e\u5c31\u5df2\u7ecf\u5b9e\u73b0\u4e86\u4e00\u4e2a\u7f51\u7ad9\u4e0a\u7ebf\u4e86\u3002\u00a0\u4e0d\u8fc7\u5148\u522b\u6025\uff0c\u5728\u5e94\u7528\u8be6\u60c5\u9875\u9762\u7684\u6700\u4e0b\u65b9\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\u8fd9\u4e2a\u5e94\u7528\u6240\u4f7f\u7528\u7684\u51fd\u6570\u8d44\u6e90\u5e76\u5728\u5176\u4e2d\u7f16\u5199\u51fd\u6570\u4ee3\u7801\u3002<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237201\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u4ee3\u7801\u7a7a\u95f4\u9ed8\u8ba4\u6709\u4e86\u4e00\u4e2a\u6700\u57fa\u672c\u7684Flask\u6846\u67b6\u6a21\u677f\uff0c\u4f60\u53ef\u4ee5\u5728\u6b64\u57fa\u7840\u4e0a\u8fdb\u884c\u5f00\u53d1\u3002\u00a0<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237202\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u5982\u4e0a\u6240\u8ff0\uff0c\u8bbf\u95eeFC\u63d0\u4f9b\u7684\u57df\u540d\u4f60\u4f1a\u53d1\u73b0\uff0c\u4e00\u4e2a\u57fa\u7840\u7684Web\u670d\u52a1\u5668\u5c31\u5728\u516c\u7f51\u73af\u5883\u4e0b\u90e8\u7f72\u6210\u529f\u4e86\u3002\u4e0d\u9700\u8981\u4e70\u57df\u540d\u548cSSL\u8bc1\u4e66\uff0c\u4e0d\u9700\u8981SSH\u767b\u5f55\u670d\u52a1\u5668\u90e8\u7f72\u73af\u5883\u548c\u8f6f\u4ef6\uff0c\u751a\u81f3\u4e0d\u9700\u8981\u624b\u52a8PUSH\u4ee3\u7801 \u3002\u00a0\u540d\u526f\u5176\u5b9e\uff0c\u65e0\u6807\u9898\u515a\uff0c\u4e00\u5206\u949f\u90e8\u7f72\u4e00\u4e2a\u7f51\u7ad9\u3002\uff08\u522b\u7684\u5e94\u7528\u6709\u76f8\u4f3c\u7684\u4e0a\u7ebf\u903b\u8f91\uff0c\u5728\u5e94\u7528\u4e2d\u5fc3\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5b8c\u6574\u7684\u5c0f\u5e94\u7528\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\uff09\u00a0\u5c0f\u5b9e\u8df5\u00a0\u5b66\u4e60\u963f\u91cc\u4e91\u51fd\u6570\u8ba1\u7b97FC\u4f7f\u7528\u7684\u76f8\u5173\u77e5\u8bc6\u4e4b\u540e\uff0c\u8fd9\u9996\u6b4c\u5269\u4e0b\u7684\u65f6\u95f4\u53ef\u4ee5\u5b8c\u6210\u4e2a\u5c0f\u5b9e\u8df5\u3002\u00a0\u5b9e\u8df5\u76ee\u6807\uff1a\u5b9e\u73b0RSS\u9605\u8bfb\u529f\u80fd\u7684Web\u7ad9\u70b9\u00a0\u5b9e\u73b0\u6b65\u9aa4\uff1a\u5b89\u88c5\u89e3\u6790\u5de5\u5177\u5199\u5165\u88c5\u9970\u5668\u548c\u8c03\u7528\u51fd\u6570\u5199\u5165HTML\u9875\u9762\u00a0\u80cc\u666f\u77e5\u8bc6\uff1a\u00a0RSS(Really Simple Syndication,\u7b80\u6613\u4fe1\u606f\u805a\u5408)\u8fd9\u662f\u4e00\u79cd\u63cf\u8ff0\u548c\u540c\u6b65\u7f51\u7ad9\u5185\u5bb9\u7684\u683c\u5f0f\u4f60\u53ef\u4ee5\u8ba4\u4e3a\u662f\u4e00\u79cd\u5b9a\u5236\u4e2a\u6027\u5316\u63a8\u9001\u4fe1\u606f\u7684\u670d\u52a1\u3002\u5b83\u80fd\u591f\u89e3\u51b3\u4f60\u6f2b\u65e0\u76ee\u7684\u7684\u6d4f\u89c8\u7f51\u9875\u7684\u95ee\u9898\u3002\u5b83\u4e0d\u4f1a\u8fc7\u65f6\uff0c\u4fe1\u606f\u8d8a\u662f\u8fc7\u5269\uff0c\u5b83\u7684\u610f\u4e49\u4e5f\u8d8a\u52a0\u5f70\u663e\u3002\u8ba9\u81ea\u5df1\u5173\u6ce8\u7684\u4fe1\u606f\u4e3b\u52a8\u6765\u627e\u81ea\u5df1\uff0c\u4e14\u8fd9\u4e9b\u4fe1\u606f\u90fd\u662f\u7528\u6237\u81ea\u5df1\u6240\u9700\u8981\u7684\uff0c\u8fd9\u5c31\u662fRSS\u7684\u610f\u4e49\u3002\u00a0feedparser\u8fd9\u662f\u4e00\u4e2aPython\u7684Feed\u89e3\u6790\u5e93\uff0c\u53ef\u4ee5\u5904\u7406RSS \uff0cCDF\uff0cAtom \u3002\u4f7f\u7528\u5b83\u6211\u4eec\u53ef\u4ece\u4efb\u4f55 RSS \u6216 Atom \u8ba2\u9605\u6e90\u5f97\u5230\u6807\u9898\u3001\u94fe\u63a5\u548c\u6587\u7ae0\u7684\u6761\u76ee\u3002\u00a0\u7b80\u8981\u8fc7\u7a0b\uff1a\u5b89\u88c5\u89e3\u6790\u5de5\u5177\u8fd9\u91cc\u4f7f\u7528\u7684\u89e3\u6790\u5de5\u5177\u662ffeedparser\u5b83\u7684feedparser.parse()\u51fd\u6570\u63d0\u4f9b\u4e86\u89e3\u6790RSS URL\u7684\u529f\u80fd\uff0c\u5b83\u53ef\u4ee5\u5c06RSS\u8fde\u63a5\u89e3\u6790\u4e3a\u4e00\u4e2a\u5b57\u5178feed \u5bf9\u5e94\u4e00\u4e2a\u5b57\u5178\uff0c\u6bcf\u4e2aentry\u5305\u542b\u4e00\u4e2a\u6587\u7ae0\u7684\u6807\u9898\uff0c\u4f5c\u8005\uff0c\u94fe\u63a5\u7b49\u5185\u5bb9\u3002\u4f7f\u7528pip3 install feedparser(\u6216pip install feedparser)\u5b89\u88c5feedparser\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237203\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u6839\u636efeedparser\u6587\u6863\u8bf4\u660e\u5199\u5165\u5fc5\u8981\u7684\u88c5\u9970\u5668\u548c\u8c03\u7528\u51fd\u6570\uff0c\u793a\u4f8b\u6587\u4ef6\uff1a\u00a0\u5176\u4e2d\uff0crender_template()\u51fd\u6570\u662fflask\u51fd\u6570\uff0c\u5b83\u4ece\u6a21\u7248\u6587\u4ef6\u5939templates\u4e2d\u5448\u73b0\u7ed9\u5b9a\u7684\u6a21\u677f\u4e0a\u4e0b\u6587\u3002\u6211\u4eechtml\u6587\u4ef6\u5c31\u8981\u653e\u5728\u6a21\u7248\u6587\u4ef6\u5939templates\u4e2d\uff0c\u672c\u4f8bhtml\u6587\u4ef6\u4e3a..\/templates\/rss.htmlfrom flask import Flask, render_template<br \/>import feedparser<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>@app.route(&#8216;\/&#8217;)<br \/>def index():<\/p>\n<pre><code>return render_template('index.html')\n\n<\/code><\/pre>\n<p>@app.route(&#8216;\/rss&#8217;, methods=[&#8220;GET&#8221;])<br \/>def rss():<\/p>\n<pre><code>feed = feedparser.parse(request.args.get('rssurl'))\nreturn render_template('rss.html', entries=feed.entries)\n\n<\/code><\/pre>\n<p>if <strong>name<\/strong> == &#8220;__main__&#8221;:<\/p>\n<pre><code>app.run(host=&quot;0.0.0.0&quot;, port=9000)\n<\/code><\/pre>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237204\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u5199\u5165HTML\u9875\u9762\u6839\u636e\u89e3\u6790\u51fa\u6765\u7684\u5185\u5bb9\u7f16\u5199\u7b80\u5355\u7684HTML\u524d\u7aef\u9875\u9762\uff0c\u793a\u4f8b\u6587\u4ef6\uff1a..\/templates\/rss.html&lt;!doctype html&gt;<br \/>&lt;html&gt;<br \/>&lt;head&gt;<br \/>&lt;meta charset=&quot;utf-8&quot;&gt;<br \/>&lt;title&gt;RSS&lt;\/title&gt;<br \/>&lt;!&#8211;\u5f15\u5165\u5916\u90e8CSS&#8211;&gt;<br \/>&lt;link href=&quot;https:\/\/cdn.bootcdn.net\/ajax\/libs\/twitter-bootstrap\/5.0.2\/css\/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&gt;<br \/>&lt;!&#8211;\u5f15\u5165\u5916\u90e8JavaScript&#8211;&gt;<br \/>&lt;script src=&quot;https:\/\/cdn.bootcdn.net\/ajax\/libs\/twitter-bootstrap\/5.0.2\/js\/bootstrap.min.js&quot;&gt;&lt;\/script&gt;<br \/>&lt;script src=&quot;https:\/\/cdn.bootcdn.net\/ajax\/libs\/jquery\/3.6.0\/jquery.slim.min.js&quot;&gt;&lt;\/script&gt;<br \/>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<br \/>  &lt;div class=&quot;container-fluid&quot;&gt;<\/p>\n<pre><code> &lt;div class=&quot;row-fluid&quot;&gt;\n  &lt;div class=&quot;span12&quot;&gt;\n    &lt;!--\u5bfc\u822a\u680f--&gt;\n    &lt;nav class=&quot;navbar navbar-expand-lg navbar-light bg-light&quot;&gt;\n      &lt;div class=&quot;container-fluid&quot;&gt;\n      &lt;a class=&quot;navbar-brand&quot; href=&quot;#&quot;&gt;RSS&lt;\/a&gt;\n      &lt;button class=&quot;navbar-toggler&quot; type=&quot;button&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#navbarSupportedContent&quot; aria-controls=&quot;navbarSupportedContent&quot; aria-expanded=&quot;false&quot; aria-label=&quot;Toggle navigation&quot;&gt;\n        &lt;span class=&quot;navbar-toggler-icon&quot;&gt;&lt;\/span&gt;\n      &lt;\/button&gt;\n      &lt;div class=&quot;collapse navbar-collapse&quot; id=&quot;navbarSupportedContent&quot;&gt;\n        &lt;ul class=&quot;navbar-nav me-auto mb-2 mb-lg-0&quot;&gt;\n          &lt;li class=&quot;nav-item&quot;&gt;\n            &lt;a class=&quot;nav-link active&quot; aria-current=&quot;page&quot; href=&quot;#&quot;&gt;\u9996\u9875&lt;\/a&gt;\n          &lt;\/li&gt;\n        &lt;\/ul&gt;\n        &lt;form class=&quot;d-flex&quot;&gt;\n        &lt;input class=&quot;form-control me-2&quot; type=&quot;search&quot; placeholder=&quot;Search&quot; aria-label=&quot;Search&quot;&gt;\n        &lt;button class=&quot;btn btn-outline-success&quot; type=&quot;submit&quot;&gt;\u641c\u7d22&lt;\/button&gt;\n        &lt;\/form&gt;\n      &lt;\/div&gt;\n      &lt;\/div&gt;\n    &lt;\/nav&gt;\n    &lt;!--\u5185\u5bb9\u5217\u8868--&gt;\n    &lt;div class=&quot;accordion&quot; id=&quot;accordionExample&quot;&gt;\n      {% for entry in entries %}\n      &lt;div class=&quot;accordion-item&quot;&gt;\n        &lt;h2 class=&quot;accordion-header&quot; id=&quot;heading{{ loop.index }}&quot;&gt;\n          &lt;button class=&quot;accordion-button&quot; type=&quot;button&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#collapse{{ loop.index }}&quot; aria-expanded=&quot;false&quot; aria-controls=&quot;collapse{{ loop.index }}&quot;&gt;\n          {{ entry.title }} | {{ entry.published }}\n          &lt;\/button&gt;\n        &lt;\/h2&gt;\n        &lt;div id=&quot;collapse{{ loop.index }}&quot; class=&quot;accordion-collapse collapse&quot; aria-labelledby=&quot;heading{{ loop.index }}&quot; data-bs-parent=&quot;#accordionExample&quot;&gt;\n          &lt;div class=&quot;accordion-body&quot;&gt;\n          {{ entry.summary | safe }}\n          &lt;\/div&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;\n      {% endfor %}\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n &lt;\/div&gt;<\/code><\/pre>\n<p>&lt;\/div&gt;<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;\u6587\u4ef6\u521b\u5efa\u5b8c\u6210\u540e\u70b9\u51fb\u4fdd\u5b58\u548c\u90e8\u7f72\uff0c\u5728\u5e94\u7528\u8be6\u60c5\u9875\u627e\u5230\u5e76\u8bbf\u95eeFC\u7ed9\u6211\u4eec\u5206\u914d\u7684\u57df\u540d\u3002<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237205\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u6548\u679c\uff1a<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042237206\" alt=\"\u56fe\u7247\" title=\"\u56fe\u7247\" loading=\"lazy\"><br \/>\u4f7f\u7528\u65b9\u6cd5\uff1a\u6211\u4eec\u4f7f\u7528GET\u8bf7\u6c42\u65b9\u5f0frequest.args.get(&#8216;rssurl&#8217;)\u83b7\u53d6\u53c2\u6570\uff0c\u56e0\u6b64\u5728URL\u540e\u9762\u4f20\u5165\u9700\u8981\u89e3\u6790\u7684RSS\u8ba2\u9605\u5730\u5740\u53c2\u6570\u5c31\u53ef\u4ee5\u89e3\u6790\u6e90\u5e76\u6e32\u67d3\u6210\u76f8\u5e94\u7684\u9605\u8bfb\u6837\u5f0f\u3002\u4f8b\u5982\uff1a \/rss?rssurl=&lt;\u89e3\u6790\u6e90&gt;\u793a\u4f8b\uff1ahttp:\/\/&lt;EIP&gt;\/rss?rssurl=<a href=\"https:\/\/link.segmentfault.com\/?enc=oGeYsPdewjwz8L%2FY12A5UA%3D%3D.S%2BdHKVLmPyQGtSctxOEApeuTo%2FeotYO39Uh2rrupUgA%3D\" rel=\"nofollow\">https:\/\/jandan.net\/feed<\/a>\u00a0\u7efc\u4e0a\uff0c\u901a\u8fc7Serverless\u51fd\u6570\u8ba1\u7b97FC\u6211\u4eec\u53ea\u9700\u8981\u4f9d\u9760feedparser\u5e93\u76f8\u5e94\u7684\u4e94\u884c\u4ee3\u7801\u5c31\u5b8c\u6210\u4e86\u8fd9\u4e2a\u5c0f\u5b9e\u8df5\u3002\u00a0\u603b\u7ed3\u6211\u4eec\u53ef\u4ee5\u771f\u5207\u7684\u611f\u53d7\u5230\uff0c\u4f7f\u7528Serverless\u51fd\u6570\u8ba1\u7b97\u5f00\u53d1\u7f51\u7ad9\u4e0e\u4f20\u7edf\u67b6\u6784\u5f00\u53d1\u6709\u5927\u4e0d\u540c\uff0c\u5b83\u6487\u53bb\u4e86\u4f20\u7edf\u5f00\u53d1\u4e2d\u90a3\u4e9b\u5197\u6742\u4f46\u662f\u53c8\u4e0d\u7ecf\u5e38\u4f1a\u53bb\u4fee\u6539\u7684\u914d\u7f6e\u548c\u6d41\u7a0b\uff0c\u8ba9\u5f00\u53d1\u8005\u4e13\u6ce8\u4e8e\u4e1a\u52a1\u903b\u8f91\u7684\u5f00\u53d1\u3002\u5e76\u4e14\u6211\u4eec\u53ef\u4ee5\u4e0d\u7528\u8003\u8651\u670d\u52a1\u5668\u7684\u9009\u578b\uff0c\u5b83\u505a\u5230\u4e86\u771f\u6b63\u7684\u5f39\u6027\u548c\u7075\u6d3b\u3002\u00a0\u672a\u6765\uff0c\u6211\u60f3\u6211\u4f1a\u518d\u8ba4\u771f\u7814\u7a76\u4e00\u4e0b\u4e91\u539f\u751f\u601d\u60f3\u548cServerless\u51fd\u6570\u8ba1\u7b97\uff0c\u4e58\u7740\u8fd9\u80a1\u65b0\u98ce\u5b9e\u73b0\u66f4\u52a0\u7075\u6d3b\u548c\u66f4\u590d\u6742\u7684\u4e1a\u52a1\u5e94\u7528\u3002\u00a0\u66f4\u591afeedparser\u5b98\u7f51 \u2014\u2014\u00a0<a href=\"https:\/\/link.segmentfault.com\/?enc=FN6qi3K1WKI%2BWV5O%2BMJTzQ%3D%3D.ke1Zjg%2F%2F%2BXy%2BD%2BQ%2Fq9jX3j%2B9CiyX7QGCKkDMOOx4hP8%2F4%2BCJ7LAi7I5mZ0XwDzui\" rel=\"nofollow\">https:\/\/pypi.org\/project\/feed&#8230;<\/a>\u6587\u6863 \u2014\u2014<a href=\"https:\/\/link.segmentfault.com\/?enc=Wb00MU16XN1%2BfJUGSM6rAQ%3D%3D.q7DrB5O6Tbq%2BHIcYGlevBDeGjP%2BO0ZEbAPu5GpMiDQnd5bZOiq9ugFmbY7JDb9y%2F\" rel=\"nofollow\">https:\/\/feedparser.readthedoc&#8230;<\/a>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=4HDng83qWeyxUNsei9%2FN8w%3D%3D.2as8IeJo%2BN7RvgCQRl0IjaBebXG0DDf1YFkgd9O0D5g9rlRuo2kKZjGyZM7J2oVn\" rel=\"nofollow\">http:\/\/click.aliyun.com\/m\/100&#8230;<\/a>\u672c\u6587\u4e3a\u963f\u91cc\u4e91\u539f\u521b\u5185\u5bb9\uff0c\u672a\u7ecf\u5141\u8bb8\u4e0d\u5f97\u8f6c\u8f7d\u3002<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042237190\">https:\/\/segmentfault.com\/a\/1190000042237190<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb\uff1a\u00a0\u4e0d\u662f\u6770\u4f26\u7684\u90a3\u4e00\u9996\u6b4c\u5566~\u90e8\u7f72\u7f51\u7ad9 \u8bf4\u597d\u4e0d\u54ed\u00a0\u5728\u63a5\u89e6serverless\u67b6\u6784\u4e4b\u524d\uff0c\u6211\u4eec\u5982\u679c\u60f3\u5b9e\u73b0\u4e0a\u7ebf\u4e00\u4e2aW [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10006041","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006041"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006041\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}