{"id":2095,"date":"2018-11-18T08:29:58","date_gmt":"2020-02-12T13:57:18","guid":{"rendered":"http:\/\/vip.fxxkpython.com\/?p=2095"},"modified":"2020-02-12T21:57:22","modified_gmt":"2020-02-12T13:57:22","slug":"234839cc93","status":"publish","type":"post","link":"https:\/\/vip.fxxkpython.com\/?p=2095","title":{"rendered":"Python:\u597d\u770b\u7684\u7537\u4eba\u4eec\uff0c\u5feb\u5230\u7897\u91cc\u6765\uff01"},"content":{"rendered":"<div class=\"bpp-post-content\">\n<h1 style=\"margin: -56px 0.5em 20px;font-size: 24px;line-height: 48px;padding-top: 56px;color: rgb(63, 81, 181);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\" >\u5199\u5728\u524d\u9762<\/h1>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u524d\u4e0d\u4e45\uff0c\u516c\u4f17\u53f7\u540e\u53f0\u6709\u59b9\u5b50\u4e0d\u9ad8\u5174\u4e86\uff0c\u79c1\u4fe1\u6211\u8bf4\uff0c\u6211\u4e3a\u4ec0\u4e48\u4f1a\u89c9\u5f97\u6211\u516c\u4f17\u53f7\u7684\u4eba\u90fd\u662f\u559c\u6b22\u770b<a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzU2ODYzNTkwMg==&amp;mid=2247483859&amp;idx=1&amp;sn=a0552110bddce7f5cba8986585495fb3&amp;chksm=fc8bb942cbfc3054d6c40cf126097e48dbd729e4698a2a5c9b4ce995e18b395db20762478bae&amp;scene=21#wechat_redirect\" target=\"_blank\">\u5973\u4eba<\/a>\u5462\uff1f\u4ec0\u4e48\u65f6\u5019\u53d1\u53d1\u7537\u4eba\u554a\u3002<\/p>\n<figure class=\"image-bubble\" style=\"margin: 20px 0.5em;text-align: center;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);letter-spacing: 1.5px;\">\n<p style=\"text-align: justify;margin-left: 1em;margin-right: 1em;\"><img decoding=\"async\" class=\" aligncenter\"     style=\"border-width: initial;border-style: none;border-color: initial;vertical-align: middle;display: inline;cursor: zoom-in;box-shadow: rgb(170, 170, 170) 0em 0em 1em 0px;\" title=\"python\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python9-1581515839.jpeg\" alt=\"python\"  \/><\/p>\n<\/figure>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u60f3\u60f3\u4e5f\u662f\uff0c\u6bd5\u7adf\u5173\u6ce8\u8fd9\u4e2a\u516c\u4f17\u53f7\u6709 15.6% \u662f\u59b9\u7eb8\u5462\u3002\u600e\u4e48\u80fd\u6ca1\u6709\u7537\u4eba\u5462\uff1f<\/p>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u90a3\u4e48\u63a5\u4e0b\u6765\u5c31\u628a\u4f60\u60f3\u8981\u7684\u5e05\u54e5\uff0c\u7528 Python \u628a\u5b83\u4eec\u88c5\u8fdb\u81ea\u5df1\u7684\u7535\u8111\u3002<\/p>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: left;letter-spacing: 1.5px;\">\u521a\u597d\u770b\u5230\u8fd9\u4e2a\u5730\u5740\uff1a<\/p>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: left;letter-spacing: 1.5px;\"><span style=\"color: rgb(0, 128, 255);\">http:\/\/www.shuaige5.com\/tag\/xinggannanren\/<\/span>&nbsp;<\/p>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: left;letter-spacing: 1.5px;\">\u53d1\u73b0\u91cc\u9762\u7684\u6027\u611f\u7537\u4eba\u771f\u7684\u5f88sexy\u54c7\u3002<\/p>\n<figure class=\"image-bubble\" style=\"margin: 20px 0.5em;text-align: center;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);letter-spacing: 1.5px;\">\n<p style=\"text-align: justify;margin-left: 1em;margin-right: 1em;\"><img decoding=\"async\" class=\" aligncenter\"     style=\"border-width: initial;border-style: none;border-color: initial;vertical-align: middle;display: inline;cursor: zoom-in;box-shadow: rgb(170, 170, 170) 0em 0em 1em 0px;\" title=\"python\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python9-1581515839.jpg\" alt=\"python\"  \/><\/p>\n<\/figure>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u7b54\u5e94\u6211\uff0c\u5148\u522b\u6fc0\u52a8\u597d\u4e48\uff1f<\/p>\n<h1 style=\"margin: -56px 0.5em 20px;font-size: 24px;line-height: 48px;padding-top: 56px;color: rgb(63, 81, 181);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u5206\u6790\u5e05\u54e5\u56fe\u7247\u5730\u5740<\/h1>\n<p style=\"text-align: center;margin-left: 1em;margin-right: 1em;\"><img decoding=\"async\" class=\" aligncenter\"       style=\"box-shadow: rgb(170, 170, 170) 0em 0em 1em 0px;\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python8-1581515840.jpg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u9996\u5148\u6765\u5206\u6790\u4e00\u4e0b\u6211\u4eec\u8981\u722c\u53d6\u7684\u8fd9\u4e9b\u56fe\u7247\u5730\u5740\uff0c\u901a\u8fc7 Chrome \u7684\u5f00\u53d1\u8005\u5de5\u5177\u53ef\u4ee5\u770b\u5230\u8fd9\u4e9b\u56fe\u7247\u7684\u5730\u5740\u5728 img \u6807\u7b7e\u4e2d\uff0c\u4f46\u662f\u8fd9\u4e2a\u5730\u5740\u6709\u70b9\u5947\u602a\uff0c\u5728 src \u91cc\u9762\u8fd8\u6709\u4e00\u4e2a src \u6307\u5411\u56fe\u7247\u7684\u5730\u5740\uff0c\u6211\u4eec\u8981\u7684\u56fe\u7247\u5730\u5740\u5c31\u662f\u5728\u7b2c\u4e8c\u4e2a src \u6307\u5411\u7684\u5730\u5740\uff0c\u6240\u4ee5\u6211\u4eec\u7684\u6b63\u5219\u5e94\u8be5\u662f\u8fd9\u6837\uff1a<\/p>\n<figure class=\"highlight plain\" style=\"margin-right: 0.5em;margin-bottom: 20px;margin-left: 0.5em;overflow-x: auto;padding: 20px 35px;font-size: 14px;line-height: 22.4px;background: rgb(245, 245, 245);color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;white-space: normal;letter-spacing: 1.5px;\">\n<table width=\"NaN\" style=\"width: 378px;\">\n<tbody>\n<tr style=\"height: 35px;border-collapse: collapse;\">\n<td class=\"gutter\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px 20px 0px 0px;font-size: 0.85em;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(114, 114, 114);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">1<\/span><br  \/><\/pre>\n<\/td>\n<td class=\"code\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(77, 77, 76);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">'&lt;div class=\"inner_wrapper_img inner_wrapper_img1\"&gt;.*?&lt;img.*?src=\"\/e\/ext.*?src=(.*?)&amp;amp;h=240&amp;amp;w=190&amp;amp;zc=1\".*?&lt;\/div&gt;'<\/span><br  \/><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u5f53\u6211\u4eec\u8981\u70b9\u51fb\u4e0b\u4e00\u9875\u7684\u65f6\u5019\u5462\uff0c\u53ef\u4ee5\u53d1\u73b0\u8bf7\u6c42\u5730\u5740\u643a\u5e26\u4e86\u4e00\u4e2a\u53c2\u6570&nbsp;<code style=\"font-family: Consolas, Monaco, courier, monospace;background: rgb(245, 245, 245);color: rgb(255, 64, 129);line-height: 1;margin-right: 4px;margin-left: 4px;font-size: 12px;padding: 3px 5px;border-width: 1px;border-style: solid;border-color: rgb(238, 238, 238);border-radius: 2px;\">\/index_2.html<\/code>&nbsp;,\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e2a\u53d8\u91cf\u6765\u83b7\u53d6\u591a\u9875\u7684\u56fe\u7247\u6570\u636e\u3002<\/p>\n<h1 style=\"margin: -56px 0.5em 20px;font-size: 24px;line-height: 48px;padding-top: 56px;color: rgb(63, 81, 181);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u722c\u53d6\u7537\u4eba\u56fe\u7247<\/h1>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u90a3\u4e48\u5206\u6790\u5b8c\u4e4b\u540e\u6211\u4eec\u5c31\u5f00\u59cb\u4e0b\u624b\u5427\uff0c\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u53eb\u505a shuaige \u7684\u56fe\u7247\u6587\u4ef6\u5939\uff0c\u4e13\u95e8\u6765\u653e\u8fd9\u4e9b\u5e05\u54e5\u7684<\/p>\n<figure class=\"highlight plain\" style=\"margin-right: 0.5em;margin-bottom: 20px;margin-left: 0.5em;overflow-x: auto;padding: 20px 35px;font-size: 14px;line-height: 22.4px;background: rgb(245, 245, 245);color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;white-space: normal;letter-spacing: 1.5px;\">\n<table width=\"NaN\">\n<tbody>\n<tr style=\"height: 35px;border-collapse: collapse;\">\n<td class=\"gutter\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px 20px 0px 0px;font-size: 0.85em;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(114, 114, 114);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">1<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">2<\/span><br  \/><\/pre>\n<\/td>\n<td class=\"code\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(77, 77, 76);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">os.mkdir(dirName)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">os.chdir(dirName)<\/span><br  \/><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u63a5\u7740\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u51e0\u4e2a\u53d8\u91cf\uff1a<\/p>\n<figure class=\"highlight plain\" style=\"margin-right: 0.5em;margin-bottom: 20px;margin-left: 0.5em;overflow-x: auto;padding: 20px 35px;font-size: 14px;line-height: 22.4px;background: rgb(245, 245, 245);color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;white-space: normal;letter-spacing: 1.5px;\">\n<table width=\"NaN\">\n<tbody>\n<tr style=\"height: 35px;border-collapse: collapse;\">\n<td class=\"gutter\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px 20px 0px 0px;font-size: 0.85em;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(114, 114, 114);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">1<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">2<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">3<\/span><br  \/><\/pre>\n<\/td>\n<td class=\"code\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(77, 77, 76);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">pageNumber = 2 #\u7528\u4e8e\u83b7\u53d6\u4e0d\u540c\u9875\u6570\u7684\u56fe\u7247<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">x = 0 #\u7528\u4e8e\u56fe\u7247\u540d\u79f0<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">img_address = [] #\u5b58\u653e\u722c\u53d6\u5230\u7684\u56fe\u7247\u5730\u5740<\/span><br  \/><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u6bd4\u5982\u6211\u4eec\u60f3\u8981\u83b7\u53d6\u7b2c 2 \u5230\u7b2c 4 \u5f20\u56fe\u7247\uff0c\u90a3\u4e48\u6211\u4eec\u5c31\u53ef\u4ee5\u5199\u4e00\u4e2a\u5faa\u73af\u6765\u83b7\u53d6\u6570\u636e\uff1a<\/p>\n<figure class=\"highlight python\" style=\"margin-right: 0.5em;margin-bottom: 20px;margin-left: 0.5em;overflow-x: auto;padding: 20px 35px;font-size: 14px;line-height: 22.4px;background: rgb(245, 245, 245);color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;white-space: normal;letter-spacing: 1.5px;\">\n<table width=\"NaN\" style=\"width: 378px;\">\n<tbody>\n<tr style=\"height: 35px;border-collapse: collapse;\">\n<td class=\"gutter\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px 20px 0px 0px;font-size: 0.85em;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(114, 114, 114);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">1<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">2<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">3<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">4<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">5<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">6<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">7<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">8<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">9<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">10<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">11<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">12<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">13<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">14<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">15<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">16<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">17<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">18<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">19<\/span><br  \/><\/pre>\n<\/td>\n<td class=\"code\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(77, 77, 76);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">while<\/span> pageNumber &lt; <span class=\"number\" style=\"color: rgb(245, 135, 31);\">5<\/span> :<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;page_url = url + <span class=\"string\" style=\"color: rgb(66, 113, 174);\">'\/index_'<\/span>+str(pageNumber)+<span class=\"string\" style=\"color: rgb(66, 113, 174);\">'.html'<\/span> <span class=\"comment\" style=\"color: rgb(142, 144, 140);\">#\u83b7\u53d6\u4e0d\u540c\u9875\u6570\u7684\u56fe\u7247<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;addrs = find_imgs(page_url) <span class=\"comment\" style=\"color: rgb(142, 144, 140);\">#\u83b7\u53d6\u5730\u5740<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">for<\/span> i <span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">in<\/span> addrs:<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">if<\/span> i <span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">in<\/span> img_address :<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">continue<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">else<\/span>:<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;img_address.append(i) <span class=\"comment\" style=\"color: rgb(142, 144, 140);\"># \u964d\u4f4e\u81f3\u5b58\u8ffd\u52a0\u5230img_address\u8fd9\u4e2a\u53d8\u91cf\u91cc\u9762<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; pageNumber += <span class=\"number\" style=\"color: rgb(245, 135, 31);\">1<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">for<\/span> each <span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">in<\/span> img_address:<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;filename = str(x) + <span class=\"string\" style=\"color: rgb(66, 113, 174);\">\".jpg\"<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;x+=<span class=\"number\" style=\"color: rgb(245, 135, 31);\">1<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">with<\/span> open(filename,<span class=\"string\" style=\"color: rgb(66, 113, 174);\">'wb'<\/span>) <span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">as<\/span> f: <span class=\"comment\" style=\"color: rgb(142, 144, 140);\"># \u5c06\u56fe\u7247\u5199\u5165\u6587\u4ef6\u5939<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;img = url_open(each).content<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;f.write(img)<\/span><br  \/><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">ok\uff0c\u6211\u4eec\u6765\u8fd0\u884c\u4e00\u4e0b\uff0c\u53ef\u4ee5\u770b\u5230\u5728\u6211\u4eec\u7684\u9879\u76ee\u76ee\u5f55\u4e2d\u521b\u5efa\u4e86\u4e00\u4e2a\u53eb\u505a shuaige \u7684\u6587\u4ef6\u5939\uff0cpython \u6b63\u5728\u4e0b\u8f7d\u6211\u4eec\u8981\u722c\u53d6\u7684\u56fe\u7247\uff1a<\/p>\n<figure class=\"image-bubble\" style=\"margin: 20px 0.5em;text-align: center;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);letter-spacing: 1.5px;\">\n<p style=\"text-align: justify;margin-left: 1em;margin-right: 1em;\"><img decoding=\"async\" class=\" aligncenter\"     style=\"border-width: initial;border-style: none;border-color: initial;vertical-align: middle;display: inline;cursor: zoom-in;width: 99%;height: auto !important;box-shadow: rgb(170, 170, 170) 0em 0em 1em 0px;\" title=\"python\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python9-1581515840.jpg\" alt=\"python\"  \/><\/p>\n<\/figure>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u6253\u5f00\u6587\u4ef6\u5939\u4e00\u770b\uff0c\u4e00\u5806 sexy \u7537\u4eba\u90fd\u6709\u4e86\uff1a<\/p>\n<figure class=\"image-bubble\" style=\"margin: 20px 0.5em;text-align: center;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);letter-spacing: 1.5px;\">\n<p style=\"text-align: justify;margin-left: 1em;margin-right: 1em;\"><img decoding=\"async\" class=\" aligncenter\"     style=\"border-width: initial;border-style: none;border-color: initial;vertical-align: middle;display: inline;cursor: zoom-in;box-shadow: rgb(170, 170, 170) 0em 0em 1em 0px;\" title=\"python\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python1-1581515840.jpeg\" alt=\"python\"  \/><\/p>\n<\/figure>\n<figure class=\"image-bubble\" style=\"margin: 20px 0.5em;text-align: center;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);letter-spacing: 1.5px;\">\n<p style=\"text-align: justify;margin-left: 1em;margin-right: 1em;\"><img decoding=\"async\" class=\" aligncenter\"     style=\"border-width: initial;border-style: none;border-color: initial;vertical-align: middle;display: inline;cursor: zoom-in;box-shadow: rgb(170, 170, 170) 0em 0em 1em 0px;\" title=\"python\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python6-1581515841.jpg\" alt=\"python\"  \/><\/p>\n<\/figure>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u53cb\u60c5\u63d0\u793a\uff1a<strong>\u5c0f\u722c\u6021\u60c5\uff0c\u5927\u722c\u4f24\u8eab\uff01<\/strong><\/p>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u5b8c\u6574\u4ee3\u7801\uff1a<br  \/><\/p>\n<figure class=\"highlight python\" style=\"margin-right: 0.5em;margin-bottom: 20px;margin-left: 0.5em;overflow-x: auto;padding: 20px 35px;font-size: 14px;line-height: 22.4px;background: rgb(245, 245, 245);color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;white-space: normal;letter-spacing: 1.5px;\">\n<table width=\"NaN\" style=\"width: 378px;\">\n<tbody>\n<tr style=\"height: 35px;border-collapse: collapse;\">\n<td class=\"gutter\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px 20px 0px 0px;font-size: 0.85em;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(114, 114, 114);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">1<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">2<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">3<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">4<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">5<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">6<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">7<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">8<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">9<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">10<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">11<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">12<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">13<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">14<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">15<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">16<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">17<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">18<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">19<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">20<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">21<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">22<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">23<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">24<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">25<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">26<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">27<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">28<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">29<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">30<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">31<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">32<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">33<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">34<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">35<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">36<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">37<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">38<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">39<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">40<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">41<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">42<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">43<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">44<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">45<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">46<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">47<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">48<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">49<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">50<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">51<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">52<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">53<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">54<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">55<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">56<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">57<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">58<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">59<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\">60<\/span><br  \/><\/pre>\n<\/td>\n<td class=\"code\" style=\"padding: 0px;border-width: initial;border-style: none;border-color: initial;border-collapse: collapse;\" height=\"35\">\n<pre style=\"margin-top: 0px;margin-bottom: 0px;overflow-x: auto;padding: 0px;line-height: 22.4px;background-color: rgb(245, 245, 245);color: rgb(77, 77, 76);font-family: Consolas, Monaco, courier, monospace;text-align: justify;\"><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">import<\/span> os<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">import<\/span> re<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">import<\/span> requests<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><span class=\"function\" style=\"color: rgb(66, 113, 174);\"><span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">def<\/span> <span class=\"title\" style=\"color: rgb(200, 40, 41);\">url_open<\/span><span class=\"params\" style=\"color: rgb(245, 135, 31);\">(url)<\/span>:<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;<span class=\"comment\" style=\"color: rgb(142, 144, 140);\"># \u4ee5\u5b57\u5178\u7684\u5f62\u5f0f\u6dfb\u52a0\u8bf7\u6c42\u5934<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;header = {<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"string\" style=\"color: rgb(66, 113, 174);\">'User-Agent'<\/span>: <span class=\"string\" style=\"color: rgb(66, 113, 174);\">\"Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/49.0.2623.221 Safari\/537.36 SE 2.X MetaSr 1.0\"<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;}<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;<span class=\"comment\" style=\"color: rgb(142, 144, 140);\"># \u4f7f\u7528get\u65b9\u6cd5\u53d1\u9001\u8bf7\u6c42\u83b7\u53d6\u7f51\u9875\u6e90\u7801<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;response = requests.get(url, headers=header)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">return<\/span> response<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><span class=\"function\" style=\"color: rgb(66, 113, 174);\"><span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">def<\/span> <span class=\"title\" style=\"color: rgb(200, 40, 41);\">find_imgs<\/span><span class=\"params\" style=\"color: rgb(245, 135, 31);\">(url)<\/span>:<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;html = url_open(url).text<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;pattern = re.compile(<span class=\"string\" style=\"color: rgb(66, 113, 174);\">'&lt;div class=\"inner_wrapper_img inner_wrapper_img1\"&gt;.*?&lt;img.*?src=\"\/e\/ext.*?src=(.*?)&amp;amp;h=240&amp;amp;w=190&amp;amp;zc=1\".*?&lt;\/div&gt;'<\/span>,re.S)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;img_addrs = re.findall(pattern, html)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">return<\/span> img_addrs<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><span class=\"function\" style=\"color: rgb(66, 113, 174);\"><span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">def<\/span> <span class=\"title\" style=\"color: rgb(200, 40, 41);\">download_shuaige<\/span><span class=\"params\" style=\"color: rgb(245, 135, 31);\">(dirName=<span class=\"string\" style=\"color: rgb(66, 113, 174);\">\"shuaige\"<\/span>)<\/span>:<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;os.mkdir(dirName)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;os.chdir(dirName)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;pageNumber = <span class=\"number\" style=\"color: rgb(245, 135, 31);\">2<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;x = <span class=\"number\" style=\"color: rgb(245, 135, 31);\">0<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;img_address = []<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">while<\/span> pageNumber &lt; <span class=\"number\" style=\"color: rgb(245, 135, 31);\">5<\/span> :<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;page_url = url + <span class=\"string\" style=\"color: rgb(66, 113, 174);\">'\/index_'<\/span>+str(pageNumber)+<span class=\"string\" style=\"color: rgb(66, 113, 174);\">'.html'<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;addrs = find_imgs(page_url)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;print(len(addrs))<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">for<\/span> i <span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">in<\/span> addrs:<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">if<\/span> i <span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">in<\/span> img_address :<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">continue<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">else<\/span>:<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;img_address.append(i)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(len(img_address))<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">for<\/span> each <span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">in<\/span> img_address:<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print(each)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;pageNumber += <span class=\"number\" style=\"color: rgb(245, 135, 31);\">1<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">for<\/span> each <span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">in<\/span> img_address:<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;filename = str(x) + <span class=\"string\" style=\"color: rgb(66, 113, 174);\">\".jpg\"<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;x+=<span class=\"number\" style=\"color: rgb(245, 135, 31);\">1<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">with<\/span> open(filename,<span class=\"string\" style=\"color: rgb(66, 113, 174);\">'wb'<\/span>) <span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">as<\/span> f:<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;img = url_open(each).content<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;f.write(img)<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"><span class=\"keyword\" style=\"color: rgb(137, 89, 168);\">if<\/span> __name__ == <span class=\"string\" style=\"color: rgb(66, 113, 174);\">'__main__'<\/span>:<\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;url = <span class=\"string\" style=\"color: rgb(66, 113, 174);\">\"http:\/\/www.shuaige5.com\/tag\/xinggannanren\"<\/span><\/span><br  \/><span class=\"line\" style=\"height: 22.4px;line-height: 22.4px;\"> &nbsp; &nbsp;download_shuaige()<\/span><br  \/><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p style=\"margin: 12px 0.5em 20px;color: rgb(33, 33, 33);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;font-size: 15px;white-space: normal;background-color: rgb(255, 255, 255);letter-spacing: 1.5px;\"><br  \/><\/p>\n<h1 style=\"margin: -56px 0.5em 20px;font-size: 24px;line-height: 48px;padding-top: 56px;color: rgb(63, 81, 181);font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Microsoft Yahei&quot;, sans-serif;white-space: normal;background-color: rgb(255, 255, 255);text-align: justify;letter-spacing: 1.5px;\">\u76f8\u5173<\/h1>\n<p><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzU2ODYzNTkwMg==&amp;mid=2247483994&amp;idx=1&amp;sn=eb6a79e7035ddbec76052ae61b966229&amp;chksm=fc8bbacbcbfc33dd38e57d7bfa0b901de182d7d1f1e37826561435c3f1794f84fd2dfe659fde&amp;scene=21#wechat_redirect\" target=\"_blank\"><strong>Python\u722c\u53d6\u5f53\u5f53\u7f51\u6700\u53d7\u6b22\u8fce\u7684 500 \u672c\u4e66<\/strong><\/a><br  \/><\/p>\n<p><br  \/><\/p>\n<p><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzU2ODYzNTkwMg==&amp;mid=2247484003&amp;idx=1&amp;sn=a719fde5ea1b26da21c0eecb4e54357f&amp;chksm=fc8bbaf2cbfc33e4c8240740c43ee69be00c8044bb2fb2042152c212c018f90818bcdd9e07ff&amp;scene=21#wechat_redirect\" target=\"_blank\"><strong>\u7528python\u722c\u53d6\u6211\u7684\u5fae\u4fe1\u597d\u53cb\uff0c\u5206\u6790\u4e4b\u540e\u53d1\u73b0\u4e86\u4e00\u4e9b\u4e8b\u60c5<\/strong><\/a><br  \/><\/p>\n<p><br  \/><\/p>\n<p style=\"margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 3px;text-align: center;\"><span style=\"letter-spacing: 3px;text-align: center;\"><br  \/><\/span><\/p>\n<p style=\"margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 3px;text-align: center;\"><span style=\"letter-spacing: 3px;text-align: center;\"><br  \/><\/span><\/p>\n<p style=\"margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 3px;text-align: center;\"><strong>\u626b\u7801\u52a0\u5165 Pythonner \u7684\u805a\u96c6\u5730<\/strong><\/p>\n<p style=\"margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 3px;text-align: justify;\"><br  \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\" aligncenter\"       style=\"width: 69%;height: auto !important;box-shadow: rgb(170, 170, 170) 0em 0em 1em 0px;\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python2-1581515842.jpeg\" alt=\"python\" title=\"python\"  \/><\/p>\n<p style=\"margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 3px;text-align: justify;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;letter-spacing: 3px;text-align: center;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;letter-spacing: 3px;text-align: justify;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;letter-spacing: 3px;text-align: justify;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: justify;letter-spacing: 3px;\">ps\uff1a\u8fd8\u6ca1\u83b7\u53d6\u6211\u7cbe\u5fc3\u51c6\u5907\u7684 Python \u7535\u5b50\u4e66\u548c\u601d\u7ef4\u5bfc\u56fe\u7b49\u5e72\u8d27\u7684\u53ef\u4ee5\u5728\u6211\u7684\u516c\u4f17\u53f7\u300c\u5b66\u4e60Python\u7684\u6b63\u786e\u59ff\u52bf\u300d\u4e2d\u53d1\u9001 python \u514d\u8d39\u83b7\u53d6\u54e6\uff01&nbsp;<\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: justify;letter-spacing: 3px;\">&nbsp;&nbsp;<\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: right;letter-spacing: 3px;\"><strong><br  \/><\/strong><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;text-align: right;letter-spacing: 3px;\"><br  \/><\/p>\n<p style=\"margin-right: 0.5em;margin-left: 0.5em;white-space: normal;letter-spacing: 3px;text-align: right;\"><span style=\"text-align: justify;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong style=\"text-align: right;\">\u987a\u624b<img decoding=\"async\" class=\"mpa-image aligncenter\"    style=\"height: 20px !important;max-height: 20px !important;width: 20px !important;\" src=\"http:\/\/vip.fxxkpython.com\/wp-content\/uploads\/2020\/02\/python9-1581515842.png\" alt=\"python\" title=\"python\"  \/>\uff0c\u70b9\u4e2a\u8d5e\u5427<\/strong><\/span><\/p>\n<p style=\"text-align: justify;margin-left: 0.5em;margin-right: 0.5em;letter-spacing: 1.5px;\"><br  \/><\/p>\n<blockquote class=\"keep-source\">\n<p>\u539f\u6587\u59cb\u53d1\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7\uff08\u5b66\u4e60python\u7684\u6b63\u786e\u59ff\u52bf\uff09\uff1a<a target=\"_blank\" href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzU2ODYzNTkwMg==&#038;mid=2247484014&#038;idx=1&#038;sn=5e24b4e5e89866fcd034e90f6a486c3d&#038;chksm=fc8bbaffcbfc33e9d59eb9a53413b26d88e09024ecb7f26f6cf002350214362aa3580e3f5c9c\">python<\/a><\/p>\n<\/blockquote>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5199\u5728\u524d\u9762 \u524d\u4e0d\u4e45\uff0c\u516c\u4f17\u53f7\u540e\u53f0\u6709\u59b9\u5b50\u4e0d\u9ad8\u5174\u4e86\uff0c\u79c1\u4fe1\u6211\u8bf4\uff0c\u6211\u4e3a\u4ec0\u4e48\u4f1a\u89c9\u5f97\u6211\u516c\u4f17\u53f7\u7684\u4eba\u90fd\u662f\u559c\u6b22\u770b\u5973\u4eba\u5462\uff1f\u4ec0\u4e48\u65f6\u5019\u53d1\u53d1\u7537\u4eba\u554a\u3002 \u60f3\u60f3\u4e5f\u662f\uff0c\u6bd5\u7adf\u5173\u6ce8\u8fd9\u4e2a\u516c\u4f17\u53f7\u6709 15.6% \u662f\u59b9\u7eb8\u5462\u3002\u600e\u4e48\u80fd\u6ca1\u6709\u7537\u4eba\u5462\uff1f \u90a3\u4e48\u63a5\u4e0b\u6765\u5c31\u628a\u4f60\u60f3\u8981\u7684\u5e05\u54e5\uff0c\u7528 Python \u628a\u5b83\u4eec\u88c5\u8fdb&hellip;<\/p>\n","protected":false},"author":1,"featured_media":2096,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[303],"tags":[302,19,300,301],"_links":{"self":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/2095"}],"collection":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2095"}],"version-history":[{"count":1,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/2095\/revisions"}],"predecessor-version":[{"id":2105,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/posts\/2095\/revisions\/2105"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=\/wp\/v2\/media\/2096"}],"wp:attachment":[{"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vip.fxxkpython.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}