{"id":864,"date":"2026-08-15T09:05:01","date_gmt":"2026-08-15T01:05:01","guid":{"rendered":"https:\/\/blog.nickys.cn\/?p=864"},"modified":"2026-08-15T09:05:01","modified_gmt":"2026-08-15T01:05:01","slug":"scrapling%ef%bc%9a%e9%a1%b5%e9%9d%a2%e6%80%8e%e4%b9%88%e6%94%b9%e7%89%88%e9%83%bd%e8%83%bd%e6%8a%93%e7%9a%84%e7%88%ac%e8%99%ab%e5%b7%a5%e5%85%b7%ef%bc%88%e5%90%ab%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/blog.nickys.cn\/?p=864","title":{"rendered":"Scrapling\uff1a\u9875\u9762\u600e\u4e48\u6539\u7248\u90fd\u80fd\u6293\u7684\u722c\u866b\u5de5\u5177\uff08\u542b\u4f7f\u7528\u6559\u7a0b\uff09"},"content":{"rendered":"<style>.sc-article{line-height:1.9;color:#333;font-size:16px}.sc-article h2{border-left:4px solid #2563eb;padding-left:10px;margin:26px 0 12px;font-size:20px;color:#111}.sc-article p{margin:12px 0}.sc-article .info{background:#f8f8f8;border-radius:8px;padding:12px 16px;font-size:14px;color:#666}.sc-article .video-wrap{margin:20px auto;text-align:center}.sc-article video{width:100%;height:auto;border-radius:8px}.sc-article pre{background:#0f172a;color:#e2e8f0;border-radius:8px;padding:14px 16px;font-size:13px;overflow-x:auto;line-height:1.6}.sc-article code{background:#f1f5f9;border-radius:4px;padding:2px 5px;font-size:.9em;color:#c026d3}.sc-article pre code{background:none;color:inherit;padding:0}.sc-article .feature{background:#eff6ff;border-radius:8px;padding:12px 16px;margin:8px 0;font-size:15px}<\/style>\n<div class=\"sc-article\">\n<h2>Scrapling\uff1a\u81ea\u9002\u5e94\u7f51\u9875\u722c\u866b\u6846\u67b6<\/h2>\n<p>\u6296\u97f3\u535a\u4e3b&#8221;AI\u747e\u89c2&#8221;\u7684\u300a\u4e00\u5929\u4e00\u4e2a\u5b9d\u85cf\u5de5\u5177\u300b\u7b2c19\u671f\u4ecb\u7ecd\u4e86\u4e00\u4e2a\u722c\u866b\u5de5\u5177\u2014\u2014<b>Scrapling<\/b>\uff0c\u5f53\u5929\u767b\u4e0a GitHub Trending \u7b2c\u4e00\u540d\u3002\u5b83\u6700\u7279\u522b\u7684\u5730\u65b9\uff1a<b>\u7f51\u7ad9\u9875\u9762\u7ed3\u6784\u600e\u4e48\u6539\u7248\uff0c\u90fd\u80fd\u81ea\u52a8\u91cd\u65b0\u5b9a\u4f4d\u5143\u7d20\uff0c\u4e0d\u9700\u8981\u624b\u52a8\u6539\u4ee3\u7801<\/b>\u3002<\/p>\n<div class=\"video-wrap\"><video controls preload=\"metadata\" playsinline style=\"width:100%;height:auto;border-radius:8px\"><source src=\"https:\/\/nas.nickys.cn:4001\/vedio\/20260815\/scrapling_tool_20260815.mp4\" type=\"video\/mp4\">\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u89c6\u9891\u64ad\u653e<\/video><\/div>\n<h2>\u5b83\u662f\u4ec0\u4e48<\/h2>\n<p>Scrapling \u662f\u4e00\u4e2a Python \u7684 Web Scraping\uff08\u7f51\u9875\u722c\u53d6\uff09\u6846\u67b6\uff0c\u4f5c\u8005\u662f D4Vinci\u3002\u4e00\u4e2a\u5e93\u540c\u65f6\u641e\u5b9a\u4e09\u4ef6\u4e8b\uff1a<\/p>\n<div class=\"feature\">\ud83d\udd77\ufe0f <b>Fetcher \u6293\u53d6<\/b>\uff1a\u666e\u901a HTTP \u8bf7\u6c42\uff08\u53ef\u6a21\u62df\u6d4f\u89c8\u5668 TLS \u6307\u7eb9\uff09\u3001\u52a8\u6001\u9875\u9762\u6d4f\u89c8\u5668\u81ea\u52a8\u5316\u3001\u4ee5\u53ca\u80fd\u81ea\u52a8\u7ed5\u8fc7 Cloudflare Turnstile \u7b49\u53cd\u673a\u5668\u4eba\u7cfb\u7edf\u7684\u9690\u79d8\u6293\u53d6\u3002<\/div>\n<div class=\"feature\">\ud83c\udfaf <b>\u89e3\u6790\u5668\u4f1a\u5b66\u4e60<\/b>\uff1a\u5b83\u7684 CSS\/XPath \u89e3\u6790\u5668\u5e26\u6709\u667a\u80fd\u76f8\u4f3c\u5ea6\u7b97\u6cd5\uff0c\u7f51\u7ad9\u6539\u7248\u540e\u80fd\u81ea\u52a8\u91cd\u65b0\u5b9a\u4f4d\u4f60\u7684\u5143\u7d20\u2014\u2014\u8fd9\u5c31\u662f\u89c6\u9891\u91cc\u8bf4\u7684&#8221;\u9875\u9762\u7ed3\u6784\u600e\u4e48\u8c03\u90fd\u80fd\u7cbe\u51c6\u6293\u53d6&#8221;\u3002<\/div>\n<div class=\"feature\">\ud83d\udd78\ufe0f <b>Spider \u6846\u67b6<\/b>\uff1a\u7c7b Scrapy \u7684\u722c\u866b API\uff0c\u652f\u6301\u5e76\u53d1\u3001\u591a Session\u3001\u6682\u505c\u6062\u590d\u3001\u81ea\u52a8\u4ee3\u7406\u8f6e\u6362\uff0c\u51e0\u884c\u4ee3\u7801\u5c31\u80fd\u6269\u5c55\u6210\u5927\u89c4\u6a21\u722c\u53d6\u3002<\/div>\n<h2>\u5b98\u7f51\u4e0e\u4ed3\u5e93<\/h2>\n<p>\u5b98\u7f51\uff1a<a href=\"https:\/\/scrapling.app\/\">https:\/\/scrapling.app\/<\/a><br \/>GitHub\uff1a<a href=\"https:\/\/github.com\/D4Vinci\/Scrapling\">https:\/\/github.com\/D4Vinci\/Scrapling<\/a><br \/>\u6587\u6863\uff1a<a href=\"https:\/\/scrapling.readthedocs.io\/\">https:\/\/scrapling.readthedocs.io\/<\/a><br \/>PyPI\uff1a<a href=\"https:\/\/pypi.org\/project\/scrapling\/\">https:\/\/pypi.org\/project\/scrapling\/<\/a><\/p>\n<h2>\u5b89\u88c5\u65b9\u6cd5<\/h2>\n<p>\u9700\u8981 Python 3.10 \u4ee5\u4e0a\uff1a<\/p>\n<pre><code>pip install scrapling<\/code><\/pre>\n<p>\u8981\u7528\u6293\u53d6\u548c\u722c\u866b\u529f\u80fd\uff0c\u518d\u88c5\u6d4f\u89c8\u5668\u4f9d\u8d56\uff1a<\/p>\n<pre><code>pip install \"scrapling[fetchers]\"\nscrapling install<\/code><\/pre>\n<p>\u4e00\u6b21\u6027\u88c5\u5168\uff08\u542b MCP\u3001\u547d\u4ee4\u884c\u7b49\uff09\uff1a<\/p>\n<pre><code>pip install \"scrapling[all]\"<\/code><\/pre>\n<p>\u4e5f\u53ef\u4ee5\u7528 Docker\uff1a<\/p>\n<pre><code>docker pull pyd4vinci\/scrapling<\/code><\/pre>\n<h2>\u5feb\u901f\u4e0a\u624b<\/h2>\n<p>\u6293\u4e00\u4e2a\u7f51\u9875\u5e76\u63d0\u53d6\u6570\u636e\uff08\u5e26\u81ea\u9002\u5e94\uff0c\u7f51\u7ad9\u6539\u7248\u4e5f\u4e0d\u6015\uff09\uff1a<\/p>\n<pre><code>from scrapling.fetchers import StealthyFetcher\n\nStealthyFetcher.adaptive = True\np = StealthyFetcher.fetch('https:\/\/example.com', headless=True, network_idle=True)\nitems = p.css('.product', adaptive=True)<\/code><\/pre>\n<p>\u6216\u8005\u5199\u4e00\u4e2a\u5b8c\u6574\u722c\u866b\uff1a<\/p>\n<pre><code>from scrapling.spiders import Spider\n\nclass MySpider(Spider):\n    name = \"demo\"\n    start_urls = [\"https:\/\/example.com\/\"]\n\n    async def parse(self, response):\n        for item in response.css('.product'):\n            yield {\"title\": item.css('h2::text').get()}\n\nMySpider().start()<\/code><\/pre>\n<p>\u7ed3\u679c\u53ef\u4ee5\u7528\u5185\u7f6e\u5bfc\u51fa\u76f4\u63a5\u5b58\u6587\u4ef6\uff1a<code>items.to_json()<\/code>\u3001<code>to_csv()<\/code>\u3001<code>to_xml()<\/code>\u3002<\/p>\n<h2>\u89c6\u9891\u91cc\u7684\u4eae\u70b9<\/h2>\n<div class=\"feature\">\ud83c\udfc6 \u5f53\u5929 GitHub Trending \u7b2c\u4e00\u540d\u7684\u4ed3\u5e93<\/div>\n<div class=\"feature\">\ud83d\udd13 \u5f00\u7bb1\u5373\u7528\u7ed5\u8fc7 Cloudflare Turnstile \u53cd\u722c<\/div>\n<div class=\"feature\">\ud83e\udde0 \u7f51\u7ad9\u6539\u7248\u81ea\u52a8\u91cd\u65b0\u5b9a\u4f4d\u5143\u7d20\uff0c\u4e0d\u7528\u6539\u4ee3\u7801<\/div>\n<div class=\"feature\">\ud83d\ude80 \u4e5f\u63d0\u4f9b\u547d\u4ee4\u884c\u6a21\u5f0f\uff0c\u4e0d\u5199\u4ee3\u7801\u4e5f\u80fd\u6293 URL<\/div>\n<p class=\"info\">\u89c6\u9891\u6765\u6e90\uff1a\u6296\u97f3 AI\u747e\u89c2\u300a\u4e00\u5929\u4e00\u4e2a\u5b9d\u85cf\u5de5\u5177\u300b\u7b2c19\u671f\u3002\u5df2\u4e0b\u8f7d\u65e0\u6c34\u5370\u9ad8\u6e05\u7248\u5b58\u6863\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Scrapling\uff1a\u81ea\u9002\u5e94\u7f51\u9875\u722c\u866b\u6846\u67b6 \u6296\u97f3\u535a\u4e3b&#8221;AI\u747e\u89c2&#8221;\u7684\u300a\u4e00\u5929\u4e00\u4e2a\u5b9d\u85cf\u5de5\u5177\u300b\u7b2c1 &#8230; <a title=\"Scrapling\uff1a\u9875\u9762\u600e\u4e48\u6539\u7248\u90fd\u80fd\u6293\u7684\u722c\u866b\u5de5\u5177\uff08\u542b\u4f7f\u7528\u6559\u7a0b\uff09\" class=\"read-more\" href=\"https:\/\/blog.nickys.cn\/?p=864\" aria-label=\"\u9605\u8bfb Scrapling\uff1a\u9875\u9762\u600e\u4e48\u6539\u7248\u90fd\u80fd\u6293\u7684\u722c\u866b\u5de5\u5177\uff08\u542b\u4f7f\u7528\u6559\u7a0b\uff09\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-864","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/blog.nickys.cn\/index.php?rest_route=\/wp\/v2\/posts\/864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nickys.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nickys.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nickys.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nickys.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=864"}],"version-history":[{"count":0,"href":"https:\/\/blog.nickys.cn\/index.php?rest_route=\/wp\/v2\/posts\/864\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nickys.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nickys.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nickys.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}