{"id":27234,"date":"2024-11-24T09:42:56","date_gmt":"2024-11-24T01:42:56","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27234\/"},"modified":"2024-11-24T09:42:56","modified_gmt":"2024-11-24T01:42:56","slug":"%e7%bd%91%e9%a1%b5%e6%ba%90%e4%bb%a3%e7%a0%81%e4%b8%8e%e9%a1%b5%e9%9d%a2%e5%86%85%e5%ae%b9%e4%b8%8d%e4%b8%80%e8%87%b4%ef%bc%8c%e5%a6%82%e4%bd%95%e8%8e%b7%e5%8f%96%e5%ae%9e%e6%97%b6%e6%9b%b4%e6%96%b0-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27234\/","title":{"rendered":"\u7f51\u9875\u6e90\u4ee3\u7801\u4e0e\u9875\u9762\u5185\u5bb9\u4e0d\u4e00\u81f4\uff0c\u5982\u4f55\u83b7\u53d6\u5b9e\u65f6\u66f4\u65b0\u7684\u52a8\u6001\u5185\u5bb9\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173121552467260.jpg\" class=\"aligncenter\" title=\"\u7f51\u9875\u6e90\u4ee3\u7801\u4e0e\u9875\u9762\u5185\u5bb9\u4e0d\u4e00\u81f4\uff0c\u5982\u4f55\u83b7\u53d6\u5b9e\u65f6\u66f4\u65b0\u7684\u52a8\u6001\u5185\u5bb9\uff1f\u63d2\u56fe\" alt=\"\u7f51\u9875\u6e90\u4ee3\u7801\u4e0e\u9875\u9762\u5185\u5bb9\u4e0d\u4e00\u81f4\uff0c\u5982\u4f55\u83b7\u53d6\u5b9e\u65f6\u66f4\u65b0\u7684\u52a8\u6001\u5185\u5bb9\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u89e3\u51b3\u722c\u866b\u4e2d\u7f51\u9875\u6e90\u4ee3\u7801\u4e0e\u9875\u9762\u5185\u5bb9\u4e0d\u4e00\u81f4\u7684\u95ee\u9898<\/strong><\/p>\n<p>\u5728\u722c\u53d6\u7f51\u9875\u6570\u636e\u65f6\uff0c\u6709\u65f6\u6211\u4eec\u4f1a\u9047\u5230\u7f51\u9875\u6e90\u4ee3\u7801\u4e0e\u5b9e\u9645\u9875\u9762\u5185\u5bb9\u4e0d\u4e00\u81f4\u7684\u60c5\u51b5\u3002\u4f8b\u5982\uff0c\u5728\u722c\u53d6 58 \u540c\u57ce\u5de5\u4f5c\u9875\u9762\u65f6\uff0c\u4f60\u53d1\u73b0\u7f51\u9875\u6e90\u4ee3\u7801\u4e2d\u663e\u793a\u7533\u8bf7\u4eba\u6570\u548c\u6d4f\u89c8\u4eba\u6570\u4e3a 0\uff0c\u4f46\u9875\u9762\u4e0a\u8fd9\u4e9b\u6570\u5b57\u5374\u5728\u5b9e\u65f6\u66f4\u65b0\u3002<\/p>\n<p><strong>\u9020\u6210\u8fd9\u79cd\u60c5\u51b5\u7684\u539f\u56e0\uff1a<\/strong><\/p>\n<p>\u7f51\u9875\u6e90\u4ee3\u7801\u662f\u52a0\u8f7d\u9875\u9762\u65f6\u52a0\u8f7d\u7684\u539f\u59cb HTML \u5185\u5bb9\u3002\u4f46\u662f\uff0c\u8bb8\u591a\u7f51\u7ad9\u4f7f\u7528 JavaScript \u548c AJAX \u6280\u672f\u52a8\u6001\u66f4\u65b0\u5176\u5185\u5bb9\u3002\u5f53\u4f60\u5728 F12 \u8c03\u8bd5\u5de5\u5177\u4e2d\u67e5\u770b\u9875\u9762\u7684 DOM \u5143\u7d20\u65f6\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\u66f4\u65b0\u540e\u7684\u5185\u5bb9\uff0c\u4f46\u8fd9\u4e9b\u5185\u5bb9\u53ef\u80fd\u4e0d\u5728\u539f\u59cb HTML \u4e2d\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<p>\u8981\u6293\u53d6\u6b64\u7c7b\u9875\u9762\u7684\u52a8\u6001\u5185\u5bb9\uff0c\u4f60\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\n<p><strong>\u722c\u53d6\u8bf7\u6c42\u7684 URL\uff1a<\/strong><\/p>\n<p>\u4e0d\u8981\u76f4\u63a5\u89e3\u6790\u9875\u9762\u6e90\u4ee3\u7801\uff0c\u800c\u662f\u627e\u51fa\u6d4f\u89c8\u5668\u5411\u670d\u52a1\u5668\u53d1\u9001\u7684\u5b9e\u9645\u8bf7\u6c42 URL\u3002\u5728\u4f60\u7684\u6848\u4f8b\u4e2d\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528 Chrome \u7f51\u7edc\u9762\u677f\uff0c\u5b83\u53ef\u4ee5\u663e\u793a\u9875\u9762\u52a0\u8f7d\u8fc7\u7a0b\u4e2d\u53d1\u751f\u7684\u8bf7\u6c42\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u5206\u6790\u8bf7\u6c42 URL\uff1a<\/strong><\/p>\n<p>\u8bf7\u6c42 URL \u901a\u5e38\u5305\u542b\u66f4\u65b0\u6240\u9700\u4fe1\u606f\u7684\u67e5\u8be2\u53c2\u6570\u3002\u5728\u4f60\u7684\u6848\u4f8b\u4e2d\uff0c\u8bf7\u6c42 URL \u53ef\u80fd\u662f\uff1a<\/p>\n<pre>https:\/\/statisticszp.58.com\/position\/totalcount\/?infoId=27988...<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<p><strong>\u53d1\u9001\u8bf7\u6c42\u5e76\u89e3\u6790\u54cd\u5e94\uff1a<\/strong><\/p>\n<p>\u4f7f\u7528 Python \u8fd9\u6837\u7684\u7f16\u7a0b\u8bed\u8a00\u5411\u8be5 URL \u53d1\u9001\u8bf7\u6c42\u3002\u54cd\u5e94\u901a\u5e38\u662f JSON \u683c\u5f0f\uff0c\u5176\u4e2d\u5305\u542b\u7533\u8bf7\u4eba\u6570\u548c\u6d4f\u89c8\u4eba\u6570\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 json \u6a21\u5757\u5bf9\u5176\u8fdb\u884c\u89e3\u6790\uff1a<\/p>\n<pre>import requests\nimport json\n\nurl = 'https:\/\/statisticszp.58.com\/position\/totalcount\/?infoId=27988...'\nresponse = requests.get(url)\ndata = json.loads(response.text)\n\napplication_count = data['deliveryCount']\nview_count = data['infoCount']<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<\/ol>\n<p>\u4ee5\u4e0a\u5c31\u662f\u7f51\u9875\u6e90\u4ee3\u7801\u4e0e\u9875\u9762\u5185\u5bb9\u4e0d\u4e00\u81f4\uff0c\u5982\u4f55\u83b7\u53d6\u5b9e\u65f6\u66f4\u65b0\u7684\u52a8\u6001\u5185\u5bb9\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u89e3\u51b3\u722c\u866b\u4e2d\u7f51\u9875\u6e90\u4ee3\u7801\u4e0e\u9875\u9762\u5185\u5bb9\u4e0d\u4e00\u81f4\u7684\u95ee\u9898 \u5728\u722c\u53d6\u7f51\u9875\u6570\u636e\u65f6\uff0c\u6709\u65f6\u6211\u4eec\u4f1a\u9047\u5230\u7f51\u9875\u6e90\u4ee3\u7801\u4e0e\u5b9e\u9645\u9875\u9762\u5185\u5bb9\u4e0d\u4e00\u81f4\u7684\u60c5\u51b5\u3002\u4f8b\u5982\uff0c\u5728\u722c\u53d6 58 \u540c\u57ce\u5de5\u4f5c\u9875\u9762\u65f6\uff0c\u4f60\u53d1\u73b0\u7f51\u9875\u6e90\u4ee3\u7801\u4e2d\u663e\u793a\u7533\u8bf7\u4eba\u6570\u548c\u6d4f\u89c8\u4eba\u6570\u4e3a 0\uff0c\u4f46\u9875\u9762\u4e0a\u8fd9\u4e9b\u6570\u5b57\u5374\u5728\u5b9e\u65f6\u66f4\u65b0\u3002 \u9020\u6210\u8fd9\u79cd\u60c5\u51b5\u7684\u539f\u56e0\uff1a \u7f51\u9875\u6e90\u4ee3\u7801\u662f\u52a0\u8f7d\u9875\u9762\u65f6\u52a0\u8f7d\u7684\u539f\u59cb HTML \u5185\u5bb9\u3002\u4f46\u662f\uff0c\u8bb8\u591a\u7f51\u7ad9\u4f7f\u7528 JavaScript \u548c AJAX \u6280\u672f\u52a8\u6001\u66f4\u65b0\u5176\u5185\u5bb9\u3002\u5f53\u4f60\u5728 F12 \u8c03\u8bd5\u5de5\u5177\u4e2d\u67e5\u770b\u9875\u9762\u7684 DOM \u5143\u7d20\u65f6\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\u66f4\u65b0\u540e\u7684\u5185\u5bb9\uff0c\u4f46\u8fd9\u4e9b\u5185\u5bb9\u53ef\u80fd\u4e0d\u5728\u539f\u59cb HTML \u4e2d\u3002 \u89e3\u51b3\u65b9\u6848\uff1a \u8981\u6293\u53d6\u6b64\u7c7b\u9875\u9762\u7684\u52a8\u6001\u5185\u5bb9\uff0c\u4f60\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u6b65\u9aa4\uff1a \u722c\u53d6\u8bf7\u6c42\u7684 URL\uff1a \u4e0d\u8981\u76f4\u63a5\u89e3\u6790\u9875\u9762\u6e90\u4ee3\u7801\uff0c\u800c\u662f\u627e\u51fa\u6d4f\u89c8\u5668\u5411\u670d\u52a1\u5668\u53d1\u9001\u7684\u5b9e\u9645\u8bf7\u6c42 URL\u3002\u5728\u4f60\u7684\u6848\u4f8b\u4e2d\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528 Chrome \u7f51\u7edc\u9762\u677f\uff0c\u5b83\u53ef\u4ee5\u663e\u793a\u9875\u9762\u52a0\u8f7d\u8fc7\u7a0b\u4e2d\u53d1\u751f\u7684\u8bf7\u6c42\u3002 \u5206\u6790\u8bf7\u6c42 URL\uff1a \u8bf7\u6c42 URL \u901a\u5e38\u5305\u542b\u66f4\u65b0\u6240\u9700\u4fe1\u606f\u7684\u67e5\u8be2\u53c2\u6570\u3002\u5728\u4f60\u7684\u6848\u4f8b\u4e2d\uff0c\u8bf7\u6c42 URL \u53ef\u80fd\u662f\uff1a https:\/\/statisticszp.58.com\/position\/totalcount\/?infoId=27988&#8230; \u767b\u5f55\u540e\u590d\u5236 \u53d1\u9001\u8bf7\u6c42\u5e76\u89e3\u6790\u54cd\u5e94\uff1a \u4f7f\u7528 Python \u8fd9\u6837\u7684\u7f16\u7a0b\u8bed\u8a00\u5411\u8be5 URL \u53d1\u9001\u8bf7\u6c42\u3002\u54cd\u5e94\u901a\u5e38\u662f JSON \u683c\u5f0f\uff0c\u5176\u4e2d\u5305\u542b\u7533\u8bf7\u4eba\u6570\u548c\u6d4f\u89c8\u4eba\u6570\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 json \u6a21\u5757\u5bf9\u5176\u8fdb\u884c\u89e3\u6790\uff1a import requests import json url = &#8216;https:\/\/statisticszp.58.com\/position\/totalcount\/?infoId=27988&#8230;&#8217; response = [&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-27234","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27234","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=27234"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27234\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}