{"id":39826,"date":"2026-07-24T11:54:28","date_gmt":"2026-07-24T11:54:28","guid":{"rendered":"https:\/\/nodemaven.com\/?p=39826"},"modified":"2026-07-24T12:00:30","modified_gmt":"2026-07-24T12:00:30","slug":"amazon-price-tracker-python","status":"publish","type":"post","link":"https:\/\/nodemaven.com\/zh\/blog\/amazon-price-tracker-python\/","title":{"rendered":"\u5982\u4f55\u7528 Python \u6784\u5efa\u4e9a\u9a6c\u900a\u4ef7\u683c\u8ffd\u8e2a\u5668"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><a href=\"https:\/\/nodemaven.com\/zh\/blog\/the-best-ai-web-scraping-stack-in-2026\/\">\u7f51\u7edc\u722c\u866b<\/a> \u53ef\u4ee5\u5e2e\u52a9\u4f60\u76d1\u63a7 Amazon \u4ef7\u683c\uff0c\u800c\u65e0\u9700\u6bcf\u5929\u624b\u52a8\u67e5\u770b\u540c\u4e00\u4e2a\u4ea7\u54c1\u9875\u9762\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u4f60\u5c06\u6784\u5efa\u4e00\u4e2a\u7b80\u5355\u7684 <strong>\u4f7f\u7528 Python \u6784\u5efa Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668<\/strong> \u7528\u4e8e\u91c7\u96c6\u4ea7\u54c1\u6807\u9898\u3001\u4ef7\u683c\u3001\u5e93\u5b58\u72b6\u6001\u548c\u9875\u9762 URL\uff0c\u7136\u540e\u5c06\u7ed3\u679c\u4fdd\u5b58\u5230 CSV \u6587\u4ef6\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8be5\u793a\u4f8b\u4f7f\u7528 Python\u3001Requests\u3001BeautifulSoup \u4ee5\u53ca\u771f\u5b9e\u7684 Amazon \u5546\u54c1\u9875\u9762\u7ed3\u6784\u3002\u4f60\u8fd8\u4f1a\u660e\u767d\u4e3a\u4ec0\u4e48 Amazon \u4ef7\u683c\u8ffd\u8e2a\u5f80\u5f80\u9700\u8981\u989d\u5916\u7684\u6821\u9a8c\uff1a\u4ef7\u683c\u53ef\u80fd\u56e0\u5730\u533a\u800c\u5f02\uff0c\u9875\u9762\u53ef\u80fd\u51fa\u73b0 CAPTCHA\uff0c\u9009\u62e9\u5668\u4e5f\u53ef\u80fd\u968f\u5546\u54c1\u7248\u5f0f\u7684\u4e0d\u540c\u800c\u53d8\u5316\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u5c0f\u89c4\u6a21\u6d4b\u8bd5\uff0c\u4e00\u4e2a\u57fa\u7840\u811a\u672c\u5c31\u8db3\u591f\u4e86\u3002\u5bf9\u4e8e\u5927\u6279\u91cf\u6216\u5bf9\u5730\u7406\u4f4d\u7f6e\u654f\u611f\u7684\u8ddf\u8e2a\uff0c <strong>\u5e72\u51c0\u7684\u4f4f\u5b85\u4ee3\u7406\u3001\u7c98\u6027\u4f1a\u8bdd\u4ee5\u53ca ZIP \u90ae\u7f16\u7ea7\u522b\u7684\u5b9a\u4f4d<\/strong> \u53ef\u4ee5\u8ba9\u7ed3\u679c\u66f4\u53ef\u9760\uff0c\u56e0\u4e3a Amazon \u53ef\u80fd\u4f1a\u6839\u636e\u4e0d\u540c\u5730\u533a\u8fd4\u56de\u4e0d\u540c\u7684\u4ef7\u683c\u3001\u914d\u9001\u8be6\u60c5\u548c\u5e93\u5b58\u60c5\u51b5\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-this-amazon-price-tracker-will-do\">\u8fd9\u4e2a Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668\u5c06\u5b9e\u73b0\u7684\u529f\u80fd<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6307\u5357\u4e2d\u7684\u8ffd\u8e2a\u5668\u5c06\u6536\u96c6\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4ea7\u54c1\u6807\u9898<\/li>\n\n\n\n<li>\u5f53\u524d\u663e\u793a\u4ef7\u683c<\/li>\n\n\n\n<li>\u5e93\u5b58\u72b6\u6001\u6587\u672c<\/li>\n\n\n\n<li>\u4ea7\u54c1 URL<\/li>\n\n\n\n<li>\u65f6\u95f4\u6233<\/li>\n\n\n\n<li>CSV \u6587\u4ef6\u4e2d\u7684\u4ef7\u683c\u5386\u53f2\u8bb0\u5f55<\/li>\n\n\n\n<li>\u5728\u7ec8\u7aef\u4e2d\u663e\u793a\u57fa\u7840\u7684\u964d\u4ef7\u63d0\u9192<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u662f\u4e00\u4e2a\u9002\u5408\u521d\u5b66\u8005\u7684\u6293\u53d6\u5de5\u5177\uff0c\u4f46\u5b83\u9075\u5faa\u4e86\u5728\u771f\u5b9e\u4ef7\u683c\u76d1\u63a7\u9879\u76ee\u4e2d\u5f88\u91cd\u8981\u7684\u4e00\u4e9b\u4e60\u60ef\u3002\u5b83\u4f1a\u68c0\u67e5\u9884\u671f\u7684\u6570\u636e\u662f\u5426\u5b58\u5728\uff0c\u907f\u514d\u5c06 CAPTCHA \u9875\u9762\u4fdd\u5b58\u4e3a\u5546\u54c1\u6570\u636e\uff0c\u5e76\u8ba9\u4ee3\u7801\u6613\u4e8e\u6269\u5c55\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u82e5\u60f3\u66f4\u5168\u9762\u5730\u4e86\u89e3\u4ef7\u683c\u8ffd\u8e2a\u5de5\u5177\u548c\u5de5\u4f5c\u6d41\u7a0b\uff0cNodeMaven \u8fd8\u63d0\u4f9b\u4e86\u4e00\u4efd\u6307\u5357\uff0c\u4ecb\u7ecd <a href=\"https:\/\/nodemaven.com\/zh\/blog\/price-monitoring-tools\/\">\u4ef7\u683c\u76d1\u63a7\u5de5\u5177<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-before-you-start-amazon-scraping-limitations\">\u5f00\u59cb\u4e4b\u524d\uff1aAmazon \u6293\u53d6\u7684\u9650\u5236<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Amazon \u9875\u9762\u6bd4\u7ec3\u4e60\u7528\u7684\u7f51\u7ad9\u66f4\u590d\u6742\u3002\u4e00\u4e2a\u5546\u54c1\u9875\u9762\u53ef\u80fd\u4f1a\u56e0\u5e02\u573a\u7ad9\u70b9\u3001ZIP \u90ae\u7f16\u3001\u6536\u8d27\u5730\u5740\u3001cookie\u3001\u767b\u5f55\u72b6\u6001\u3001\u4fc3\u9500\u72b6\u6001\u548c\u5546\u54c1\u7c7b\u578b\u7684\u4e0d\u540c\u800c\u53d8\u5316\u3002 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5927\u89c4\u6a21\u91c7\u96c6\u6570\u636e\u4e4b\u524d\uff0c\u8bf7\u67e5\u9605 Amazon \u7684 <a href=\"https:\/\/www.amazon.com\/gp\/help\/customer\/display.html?nodeId=508088\">\u4f7f\u7528\u6761\u4ef6<\/a>\u3002\u5bf9\u4e8e\u5df2\u83b7\u6279\u51c6\u7684\u5546\u54c1\u6570\u636e\u4f7f\u7528\u573a\u666f\uff0c\u8fd8\u8bf7\u67e5\u770b Amazon \u7684 <a href=\"https:\/\/webservices.amazon.com\/paapi5\/documentation\/\">Product Advertising API \u6587\u6863<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6559\u7a0b\u7528\u4e8e\u5b66\u4e60\u4ef7\u683c\u8ffd\u8e2a\u7684\u5de5\u4f5c\u539f\u7406\u3002\u5982\u679c\u4f60\u6253\u7b97\u8fd0\u884c\u751f\u4ea7\u73af\u5883\u7684\u722c\u866b\uff0c\u8fd8\u8bf7\u9605\u8bfb NodeMaven \u5173\u4e8e <a href=\"https:\/\/nodemaven.com\/zh\/blog\/is-web-scraping-legal\/\">\u7f51\u9875\u6293\u53d6\u662f\u5426\u5408\u6cd5<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Amazon \u4ef7\u683c\u8ddf\u8e2a\u901a\u5e38\u4f1a\u53d8\u5f97\u56f0\u96be\uff0c\u539f\u56e0\u5728\u4e8e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CAPTCHA \u9a8c\u8bc1\u9875\u9762<\/strong> \u800c\u4e0d\u662f\u5546\u54c1\u9875\u9762<\/li>\n\n\n\n<li><strong>403 \u6216 503 \u9519\u8bef<\/strong><\/li>\n\n\n\n<li><strong>\u4ef7\u683c\u5206\u6563\u5728\u591a\u4e2a HTML \u5143\u7d20\u4e2d<\/strong><\/li>\n\n\n\n<li><strong>\u56e0\u5730\u533a\u6216 ZIP \u90ae\u7f16\u800c\u5f02\u7684\u4ef7\u683c<\/strong><\/li>\n\n\n\n<li><strong>\u4e0d\u540c\u4ea7\u54c1\u5e03\u5c40\u4e4b\u95f4\u9009\u62e9\u5668\u4f1a\u53d1\u751f\u53d8\u5316<\/strong><\/li>\n\n\n\n<li><strong>\u8bf7\u6c42\u8fd4\u56de\u7684\u5185\u5bb9\u4e0e\u6d4f\u89c8\u5668\u4e0d\u540c<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f00\u53d1\u8005\u7ecf\u5e38\u9047\u5230\u8fd9\u4e9b\u95ee\u9898\u3002\u4f8b\u5982\uff0c\u8fd9\u4e2a\u5173\u4e8e <a href=\"https:\/\/stackoverflow.com\/questions\/61978456\/trying-to-webscrape-the-price-from-an-amazon-page-using-the-css-selector-and-pyt\">Amazon CAPTCHA \u548c\u4ef7\u683c\u9009\u62e9\u5668\u95ee\u9898<\/a> \u8bf4\u660e\u4e86\u4e3a\u4ec0\u4e48\u540e\u5907\u9009\u62e9\u5668\u548c\u54cd\u5e94\u9a8c\u8bc1\u5f88\u91cd\u8981\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-1-set-up-the-python-project\">\u7b2c 1 \u6b65\uff1a\u642d\u5efa Python \u9879\u76ee<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e3a\u8be5\u9879\u76ee\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\uff0c\u5e76\u5728\u4f60\u7684\u7f16\u8f91\u5668\u4e2d\u6253\u5f00\u5b83\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u4f7f\u7528 macOS \u6216 Linux\uff0c\u8bf7\u8fd0\u884c\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"bash\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-bash\" data-rhino-code=\"mkdir%20amazon-price-tracker%0Acd%20amazon-price-tracker%0Apython3%20-m%20venv%20venv%0Asource%20venv%2Fbin%2Factivate%0Apip%20install%20requests%20beautifulsoup4%20lxml\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u4f7f\u7528 Windows\uff0c\u8bf7\u8fd0\u884c\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"bash\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-bash\" data-rhino-code=\"mkdir%20amazon-price-tracker%0Acd%20amazon-price-tracker%0Apython%20-m%20venv%20venv%0Avenv%5CScripts%5Cactivate%0Apip%20install%20requests%20beautifulsoup4%20lxml\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\uff0c\u547d\u540d\u4e3a\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"plaintext\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-plaintext\" data-rhino-code=\"amazon_price_tracker.py\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u53ef\u4ee5\u5728 VS Code\u3001PyCharm \u6216\u4efb\u4f55\u6587\u672c\u7f16\u8f91\u5668\u4e2d\u521b\u5efa\u5b83\u3002\u8bf7\u4fdd\u6301\u8be5\u6587\u4ef6\u6253\u5f00\uff0c\u56e0\u4e3a\u63a5\u4e0b\u6765\u7684\u6b65\u9aa4\u4f1a\u9010\u6b65\u6784\u5efa\u8fd9\u4e2a\u811a\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u8fd9\u662f\u4f60\u7684\u7b2c\u4e00\u4e2a\u722c\u866b\uff0c\u90a3\u4e48 <a href=\"https:\/\/nodemaven.com\/zh\/blog\/python-web-scraping\/\">Python \u7f51\u9875\u6293\u53d6<\/a> \u6307\u5357\u66f4\u8be6\u7ec6\u5730\u8bb2\u89e3\u4e86 Requests\u3001BeautifulSoup\u3001\u9009\u62e9\u5668\u4ee5\u53ca CSV \u5bfc\u51fa\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u7ecf\u8fc7\u6d4b\u8bd5\u7684\u914d\u7f6e\uff1a<\/strong> Python 3.12\u3001Requests\u3001BeautifulSoup4 \u548c lxml\u3002\u73af\u5883\u51c6\u5907\u5c31\u7eea\u540e\uff0c\u8be5\u811a\u672c\u53ef\u5728 macOS\u3001Windows \u6216 Linux \u4e0a\u8fd0\u884c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-2-inspect-an-amazon-product-page\">\u7b2c 2 \u6b65\uff1a\u68c0\u67e5 Amazon \u5546\u54c1\u9875\u9762<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5f00\u4f60\u60f3\u8981\u8ddf\u8e2a\u7684 Amazon \u4ea7\u54c1\u9875\u9762\u3002\u53f3\u952e\u70b9\u51fb\u4ea7\u54c1\u6807\u9898\u5e76\u9009\u62e9 <strong>\u68c0\u67e5<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"555\" src=\"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/image-30-1024x555.png\" alt=\"Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668 | \u4ece\u5546\u54c1\u9875\u9762\u590d\u5236\u9009\u62e9\u5668\" class=\"wp-image-39828\" srcset=\"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/image-30-1024x555.png 1024w, https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/image-30-300x163.png 300w, https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/image-30-768x416.png 768w, https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/image-30-1536x833.png 1536w, https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/image-30-18x10.png 18w, https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/image-30.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u672c\u6b21\u6d4b\u8bd5\u6240\u7528\u7684\u4ea7\u54c1\u9875\u9762\u4e0a\uff0c\u6807\u9898\u4f4d\u4e8e\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"%22%23productTitle%22\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u68c0\u67e5\u4ef7\u683c\u3002Amazon \u901a\u5e38\u4f1a\u5c06\u5b8c\u6574\u4ef7\u683c\u5b58\u50a8\u5728\u4e00\u4e2a\u5c4f\u5e55\u5916\u7684\u5143\u7d20\u4e2d\uff0c\u4f46\u5728\u67d0\u4e9b\u9875\u9762\u4e0a\uff0c\u53ef\u89c1\u7684\u4ef7\u683c\u4f1a\u88ab\u62c6\u5206\u6210\u591a\u4e2a\u72ec\u7acb\u7684\u90e8\u5206\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"%22.a-price-symbol%22%0A%22.a-price-whole%22%0A%22.a-price-fraction%22\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5c31\u662f\u811a\u672c\u4f7f\u7528\u540e\u5907\u9009\u62e9\u5668\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u5355\u4e00\u4ef7\u683c\u5143\u7d20\u7684\u539f\u56e0\u3002<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"TITLE_SELECTORS%20%3D%20%5B%0A%20%20%20%20%22%23productTitle%22%2C%0A%5D%0A%0APRICE_SELECTORS%20%3D%20%5B%0A%20%20%20%20%22%23corePrice_feature_div%20.a-price%20.a-offscreen%22%2C%0A%20%20%20%20%22%23apex_desktop%20.a-price%20.a-offscreen%22%2C%0A%20%20%20%20%22.a-price%20.a-offscreen%22%2C%0A%20%20%20%20%22%23priceblock_ourprice%22%2C%0A%20%20%20%20%22%23priceblock_dealprice%22%2C%0A%5D%0A%0AAVAILABILITY_SELECTORS%20%3D%20%5B%0A%20%20%20%20%22%23availability%22%2C%0A%5D\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e9b\u9009\u62e9\u5668\u4ec5\u4e3a\u4f9b\u6d4b\u8bd5\u7684\u793a\u4f8b\uff0c\u5e76\u975e\u9002\u7528\u4e8e\u6574\u4e2a Amazon \u7684\u901a\u7528\u9009\u62e9\u5668\u3002Amazon \u9875\u9762\u53ef\u80fd\u56e0\u5e02\u573a\u3001\u4ea7\u54c1\u7c7b\u522b\u3001\u4fc3\u9500\u5e03\u5c40\u548c\u5e93\u5b58\u72b6\u6001\u800c\u6709\u6240\u4e0d\u540c\u3002\u8bf7\u52a1\u5fc5\u68c0\u67e5\u4f60\u8ba1\u5212\u8ffd\u8e2a\u7684\u5177\u4f53\u9875\u9762\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f00\u53d1\u8005\u7ecf\u5e38\u9047\u5230 Amazon \u9009\u62e9\u5668\u548c CAPTCHA \u95ee\u9898\u3002\u8fd9\u4e2a Stack Overflow \u4e0a\u5173\u4e8e <a href=\"https:\/\/stackoverflow.com\/questions\/61978456\/trying-to-webscrape-the-price-from-an-amazon-page-using-the-css-selector-and-pyt\">Amazon CAPTCHA \u548c\u4ef7\u683c\u9009\u62e9\u5668\u95ee\u9898<\/a> \u5f88\u597d\u5730\u8bf4\u660e\u4e86\u4e3a\u4ec0\u4e48\u6293\u53d6\u7a0b\u5e8f\u9700\u8981\u5907\u7528\u9009\u62e9\u5668\u548c\u54cd\u5e94\u9a8c\u8bc1\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-3-fetch-the-amazon-page-with-requests\">\u7b2c 3 \u6b65\uff1a\u4f7f\u7528 Requests \u83b7\u53d6 Amazon \u9875\u9762<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\u6dfb\u52a0\u4e00\u4e2a\u7528\u4e8e\u4e0b\u8f7d\u9875\u9762 HTML \u7684\u51fd\u6570\u3002<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"import%20requests%0A%0AHEADERS%20%3D%20%7B%0A%20%20%20%20%22User-Agent%22%3A%20%28%0A%20%20%20%20%20%20%20%20%22Mozilla%2F5.0%20%28Windows%20NT%2010.0%3B%20Win64%3B%20x64%29%20%22%0A%20%20%20%20%20%20%20%20%22AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20%22%0A%20%20%20%20%20%20%20%20%22Chrome%2F126.0.0.0%20Safari%2F537.36%22%0A%20%20%20%20%29%2C%0A%20%20%20%20%22Accept-Language%22%3A%20%22en-US%2Cen%3Bq%3D0.9%22%2C%0A%7D%0A%0A%0Adef%20fetch_page%28url%2C%20proxies%3DNone%29%3A%0A%20%20%20%20response%20%3D%20requests.get%28%0A%20%20%20%20%20%20%20%20url%2C%0A%20%20%20%20%20%20%20%20headers%3DHEADERS%2C%0A%20%20%20%20%20%20%20%20proxies%3Dproxies%2C%0A%20%20%20%20%20%20%20%20timeout%3D30%2C%0A%20%20%20%20%29%0A%0A%20%20%20%20response.raise_for_status%28%29%0A%0A%20%20%20%20html%20%3D%20response.text.lower%28%29%0A%20%20%20%20captcha_markers%20%3D%20%5B%0A%20%20%20%20%20%20%20%20%22captcha%22%2C%0A%20%20%20%20%20%20%20%20%22sorry%2C%20we%20just%20need%20to%20make%20sure%22%2C%0A%20%20%20%20%20%20%20%20%22robot%20check%22%2C%0A%20%20%20%20%5D%0A%0A%20%20%20%20if%20any%28marker%20in%20html%20for%20marker%20in%20captcha_markers%29%3A%0A%20%20%20%20%20%20%20%20raise%20RuntimeError%28%22Amazon%20returned%20a%20CAPTCHA%20or%20verification%20page.%22%29%0A%0A%20%20%20%20return%20response.text\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u81ea\u5b9a\u4e49\u8bf7\u6c42\u5934\u8ba9\u8bf7\u6c42\u770b\u8d77\u6765\u66f4\u63a5\u8fd1\u666e\u901a\u7684\u6d4f\u89c8\u5668\u8bf7\u6c42\u3002\u8fd9\u5e76\u4e0d\u80fd\u4fdd\u8bc1\u8bbf\u95ee\u6210\u529f\uff0c\u4f46\u5b83\u907f\u514d\u4e86\u53d1\u9001 Python Requests \u7684\u9ed8\u8ba4 user agent\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CAPTCHA \u68c0\u67e5\u540c\u6837\u91cd\u8981\u3002\u4e00\u4e2a\u8bf7\u6c42\u53ef\u80fd\u8fd4\u56de\u6210\u529f\u7684 <code>200 OK<\/code> \u54cd\u5e94\uff0c\u4f46\u4ecd\u7136\u8fd4\u56de\u9a8c\u8bc1\u9875\u9762\u800c\u975e\u4ea7\u54c1\u6570\u636e\u3002 <strong>\u5207\u52ff\u5c06\u6210\u529f\u7684\u72b6\u6001\u7801\u5f53\u4f5c\u722c\u866b\u91c7\u96c6\u5230\u6b63\u786e\u9875\u9762\u7684\u8bc1\u636e\u3002<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-4-extract-title-price-and-availability\">\u7b2c 4 \u6b65\uff1a\u63d0\u53d6\u6807\u9898\u3001\u4ef7\u683c\u548c\u5e93\u5b58\u60c5\u51b5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a5\u4e0b\u6765\uff0c\u6dfb\u52a0 BeautifulSoup \u548c\u51e0\u4e2a\u8f85\u52a9\u51fd\u6570\u3002<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"import%20re%0Afrom%20bs4%20import%20BeautifulSoup%0A%0A%0Adef%20first_text%28soup%2C%20selectors%29%3A%0A%20%20%20%20for%20selector%20in%20selectors%3A%0A%20%20%20%20%20%20%20%20element%20%3D%20soup.select_one%28selector%29%0A%20%20%20%20%20%20%20%20if%20element%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20text%20%3D%20element.get_text%28%22%20%22%2C%20strip%3DTrue%29%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20text%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20text%0A%0A%20%20%20%20return%20None%0A%0A%0Adef%20split_price_text%28soup%29%3A%0A%20%20%20%20price%20%3D%20%28%0A%20%20%20%20%20%20%20%20soup.select_one%28%22%23corePrice_feature_div%20.a-price%22%29%0A%20%20%20%20%20%20%20%20or%20soup.select_one%28%22%23apex_desktop%20.a-price%22%29%0A%20%20%20%20%20%20%20%20or%20soup.select_one%28%22.a-price%22%29%0A%20%20%20%20%29%0A%0A%20%20%20%20if%20not%20price%3A%0A%20%20%20%20%20%20%20%20return%20None%0A%0A%20%20%20%20symbol%20%3D%20price.select_one%28%22.a-price-symbol%22%29%0A%20%20%20%20whole%20%3D%20price.select_one%28%22.a-price-whole%22%29%0A%20%20%20%20fraction%20%3D%20price.select_one%28%22.a-price-fraction%22%29%0A%0A%20%20%20%20if%20not%20whole%3A%0A%20%20%20%20%20%20%20%20return%20None%0A%0A%20%20%20%20symbol_text%20%3D%20symbol.get_text%28strip%3DTrue%29%20if%20symbol%20else%20%22%22%0A%20%20%20%20whole_text%20%3D%20whole.get_text%28strip%3DTrue%29.replace%28%22.%22%2C%20%22%22%29%0A%20%20%20%20fraction_text%20%3D%20fraction.get_text%28strip%3DTrue%29%20if%20fraction%20else%20%2200%22%0A%0A%20%20%20%20return%20f%22%7Bsymbol_text%7D%7Bwhole_text%7D.%7Bfraction_text%7D%22%0A%0A%0Adef%20parse_price%28price_text%29%3A%0A%20%20%20%20if%20not%20price_text%3A%0A%20%20%20%20%20%20%20%20return%20None%0A%0A%20%20%20%20match%20%3D%20re.search%28r%22%28%5Cd%2B%5B%5Cd%2C%5D%2A%5C.%3F%5Cd%2A%29%22%2C%20price_text.replace%28%22%2C%22%2C%20%22%22%29%29%0A%0A%20%20%20%20if%20not%20match%3A%0A%20%20%20%20%20%20%20%20return%20None%0A%0A%20%20%20%20return%20float%28match.group%281%29%29\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u8be5 <code>first_text()<\/code> \u51fd\u6570\u4f1a\u5c1d\u8bd5\u591a\u4e2a\u9009\u62e9\u5668\uff0c\u5e76\u8fd4\u56de\u5b83\u627e\u5230\u7684\u7b2c\u4e00\u4e2a\u503c\u3002\u8fd9\u5f88\u6709\u7528\uff0c\u56e0\u4e3a Amazon \u53ef\u80fd\u4f1a\u628a\u4ef7\u683c\u653e\u5728\u9875\u9762\u7684\u4e0d\u540c\u4f4d\u7f6e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8be5 <code>split_price_text()<\/code> \u51fd\u6570\u7528\u4e8e\u5904\u7406\u4ef7\u683c\u4ee5\u72ec\u7acb\u7684\u7b26\u53f7\u3001\u6574\u6570\u548c\u5c0f\u6570\u5143\u7d20\u663e\u793a\u7684\u9875\u9762\u3002\u4f8b\u5982\uff0c <code>$23.99<\/code> \u5728 HTML \u4e2d\u53ef\u80fd\u663e\u793a\u4e3a <code>$<\/code>, <code>23<\/code>\uff0c\u4ee5\u53ca <code>99<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8be5 <code>parse_price()<\/code> \u51fd\u6570\u4f1a\u4ece\u53ef\u89c1\u7684\u4ef7\u683c\u6587\u672c\u4e2d\u63d0\u53d6\u4e00\u4e2a\u6570\u503c\u3002\u6b64\u7248\u672c\u5047\u5b9a\u4ef7\u683c\u91c7\u7528\u7f8e\u5f0f\u683c\u5f0f\uff0c\u4f8b\u5982 <code>$49.99<\/code>\u3002\u5982\u679c\u4f60\u8ddf\u8e2a\u7684\u662f\u53e6\u4e00\u4e2a Amazon \u7ad9\u70b9\uff0c\u8bf7\u6839\u636e\u5f53\u5730\u7684\u8d27\u5e01\u548c\u5c0f\u6570\u683c\u5f0f\u8fdb\u884c\u8c03\u6574\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\u6dfb\u52a0\u5546\u54c1\u6293\u53d6\u51fd\u6570\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"from%20datetime%20import%20datetime%0A%0A%0ATITLE_SELECTORS%20%3D%20%5B%0A%20%20%20%20%22%23productTitle%22%2C%0A%5D%0A%0APRICE_SELECTORS%20%3D%20%5B%0A%20%20%20%20%22%23corePrice_feature_div%20.a-price%20.a-offscreen%22%2C%0A%20%20%20%20%22%23apex_desktop%20.a-price%20.a-offscreen%22%2C%0A%20%20%20%20%22.a-price%20.a-offscreen%22%2C%0A%20%20%20%20%22%23priceblock_ourprice%22%2C%0A%20%20%20%20%22%23priceblock_dealprice%22%2C%0A%5D%0A%0AAVAILABILITY_SELECTORS%20%3D%20%5B%0A%20%20%20%20%22%23availability%22%2C%0A%5D%0A%0A%0Adef%20scrape_product%28url%2C%20proxies%3DNone%29%3A%0A%20%20%20%20html%20%3D%20fetch_page%28url%2C%20proxies%3Dproxies%29%0A%20%20%20%20soup%20%3D%20BeautifulSoup%28html%2C%20%22lxml%22%29%0A%0A%20%20%20%20title%20%3D%20first_text%28soup%2C%20TITLE_SELECTORS%29%0A%20%20%20%20price_text%20%3D%20first_text%28soup%2C%20PRICE_SELECTORS%29%20or%20split_price_text%28soup%29%0A%20%20%20%20availability%20%3D%20first_text%28soup%2C%20AVAILABILITY_SELECTORS%29%0A%20%20%20%20price%20%3D%20parse_price%28price_text%29%0A%0A%20%20%20%20if%20not%20title%3A%0A%20%20%20%20%20%20%20%20raise%20ValueError%28%22Product%20title%20was%20not%20found.%20Check%20the%20selector%20or%20page%20HTML.%22%29%0A%0A%20%20%20%20if%20price%20is%20None%3A%0A%20%20%20%20%20%20%20%20raise%20ValueError%28%22Product%20price%20was%20not%20found.%20Check%20the%20selector%20or%20page%20HTML.%22%29%0A%0A%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20%22timestamp%22%3A%20datetime.utcnow%28%29.isoformat%28timespec%3D%22seconds%22%29%2C%0A%20%20%20%20%20%20%20%20%22title%22%3A%20title%2C%0A%20%20%20%20%20%20%20%20%22price_text%22%3A%20price_text%2C%0A%20%20%20%20%20%20%20%20%22price%22%3A%20price%2C%0A%20%20%20%20%20%20%20%20%22availability%22%3A%20availability%20or%20%22Unknown%22%2C%0A%20%20%20%20%20%20%20%20%22url%22%3A%20url%2C%0A%20%20%20%20%7D\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u51fd\u6570\u4e3a\u53ef\u9760\u6027\u505a\u4e86\u4e00\u4ef6\u6709\u7528\u7684\u4e8b\uff1a\u5f53\u6807\u9898\u6216\u4ef7\u683c\u7f3a\u5931\u65f6\uff0c\u5b83\u4f1a\u660e\u786e\u62a5\u9519\u3002\u8fd9\u6bd4\u4fdd\u5b58\u4e00\u4e2a\u7a7a\u503c\u3001\u4e4b\u540e\u624d\u53d1\u73b0 CSV \u91cc\u6ee1\u662f\u635f\u574f\u7684\u884c\u8981\u597d\u5f97\u591a\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-5-save-amazon-price-history-to-csv\">\u7b2c 5 \u6b65\uff1a\u5c06 Amazon \u4ef7\u683c\u5386\u53f2\u4fdd\u5b58\u4e3a CSV<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u6bcf\u6b21\u68c0\u67e5\u90fd\u88ab\u4fdd\u5b58\u4e0b\u6765\u65f6\uff0c\u4ef7\u683c\u8ddf\u8e2a\u5668\u4f1a\u53d8\u5f97\u66f4\u52a0\u5b9e\u7528\u3002\u6dfb\u52a0\u4ee5\u4e0b CSV \u51fd\u6570\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"import%20csv%0Afrom%20pathlib%20import%20Path%0A%0A%0ACSV_FILE%20%3D%20Path%28%22amazon_price_history.csv%22%29%0A%0AFIELDNAMES%20%3D%20%5B%0A%20%20%20%20%22timestamp%22%2C%0A%20%20%20%20%22title%22%2C%0A%20%20%20%20%22price_text%22%2C%0A%20%20%20%20%22price%22%2C%0A%20%20%20%20%22availability%22%2C%0A%20%20%20%20%22url%22%2C%0A%5D%0A%0A%0Adef%20save_to_csv%28record%29%3A%0A%20%20%20%20file_exists%20%3D%20CSV_FILE.exists%28%29%0A%0A%20%20%20%20with%20CSV_FILE.open%28%22a%22%2C%20newline%3D%22%22%2C%20encoding%3D%22utf-8%22%29%20as%20file%3A%0A%20%20%20%20%20%20%20%20writer%20%3D%20csv.DictWriter%28file%2C%20fieldnames%3DFIELDNAMES%29%0A%0A%20%20%20%20%20%20%20%20if%20not%20file_exists%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20writer.writeheader%28%29%0A%0A%20%20%20%20%20%20%20%20writer.writerow%28record%29\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u8be5 <code>newline=\"\"<\/code> \u8bbe\u7f6e\u9075\u5faa Python \u7684 <a href=\"https:\/\/docs.python.org\/3\/library\/csv.html\">CSV \u6587\u6863<\/a> \u5e76\u6709\u52a9\u4e8e\u907f\u514d\u5728\u67d0\u4e9b\u7cfb\u7edf\u4e0a\u51fa\u73b0\u989d\u5916\u7684\u7a7a\u884c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u811a\u672c\u8fd0\u884c\u540e\uff0cCSV \u6587\u4ef6\u5c06\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>\u65f6\u95f4\u6233<\/th><th>\u6807\u9898<\/th><th>price_text<\/th><th>\u4ef7\u683c<\/th><th>\u53ef\u7528\u6027<\/th><th>url<\/th><\/tr><tr><td>2026-07-24T10:15:30<\/td><td>Owala FreeSip \u4e0d\u9508\u94a2\u4fdd\u6e29\u6c34\u74f6<\/td><td>$23.99<\/td><td>23.99<\/td><td>In Stock<\/td><td>Amazon \u5546\u54c1 URL<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u7b80\u5355\u7684\u5386\u53f2\u8bb0\u5f55\u6587\u4ef6\u5bf9\u4e8e\u7b2c\u4e00\u4e2a\u7248\u672c\u6765\u8bf4\u5df2\u7ecf\u8db3\u591f\u4e86\u3002\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5c06\u6570\u636e\u8fc1\u79fb\u5230 Google Sheets\u3001\u6570\u636e\u5e93\u6216\u4eea\u8868\u677f\u4e2d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-6-track-multiple-amazon-products\">\u7b2c 6 \u6b65\uff1a\u8ffd\u8e2a\u591a\u4e2a Amazon \u5546\u54c1<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\u6dfb\u52a0\u4e00\u4efd\u4ea7\u54c1 URL \u5217\u8868\u3002\u7528\u771f\u5b9e\u7684 Amazon \u4ea7\u54c1\u9875\u9762\u66ff\u6362\u793a\u4f8b URL\u3002<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"PRODUCT_URLS%20%3D%20%5B%0A%20%20%20%20%22https%3A%2F%2Fwww.amazon.com%2Fdp%2FASIN1%22%2C%0A%20%20%20%20%22https%3A%2F%2Fwww.amazon.com%2Fdp%2FASIN2%22%2C%0A%5D\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u6dfb\u52a0\u4e00\u4e2a\u904d\u5386\u6bcf\u4e2a\u4ea7\u54c1\u7684\u4e3b\u51fd\u6570\u3002<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"from%20time%20import%20sleep%0A%0A%0Adef%20main%28%29%3A%0A%20%20%20%20for%20url%20in%20PRODUCT_URLS%3A%0A%20%20%20%20%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20record%20%3D%20scrape_product%28url%29%0A%20%20%20%20%20%20%20%20%20%20%20%20save_to_csv%28record%29%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20print%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22%7Brecord%5B%27title%27%5D%7D%20%7C%20%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22%7Brecord%5B%27price_text%27%5D%7D%20%7C%20%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22%7Brecord%5B%27availability%27%5D%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%29%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20sleep%2810%29%0A%0A%20%20%20%20%20%20%20%20except%20Exception%20as%20error%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20print%28f%22Failed%20to%20track%20%7Burl%7D%3A%20%7Berror%7D%22%29%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20main%28%29\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u8be5 <code>sleep(10)<\/code> delay \u53ef\u9632\u6b62\u811a\u672c\u8fc7\u5feb\u5730\u8bf7\u6c42\u9875\u9762\u3002\u5bf9\u4e8e\u771f\u5b9e\u7684\u8ffd\u8e2a\u6765\u8bf4\uff0c\u5e94\u907f\u514d\u8fc7\u4e8e\u6fc0\u8fdb\u7684\u8bf7\u6c42\u9891\u7387\u3002\u4ef7\u683c\u8ffd\u8e2a\u5668\u901a\u5e38\u4e0d\u9700\u8981\u6bcf\u9694\u51e0\u79d2\u5c31\u68c0\u67e5\u540c\u4e00\u4ef6\u5546\u54c1\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u60f3\u4e86\u89e3\u66f4\u591a\u901a\u7528\u7684\u6293\u53d6\u793a\u4f8b\uff0cNodeMaven \u63d0\u4f9b\u4e86\u4e00\u4efd\u6307\u5357\uff0c\u4ecb\u7ecd <a href=\"https:\/\/nodemaven.com\/zh\/blog\/python-web-scraping\/\">Python \u7f51\u9875\u6293\u53d6<\/a> \u4ee5\u53ca\u4e00\u4efd\u5355\u72ec\u7684\u5bf9\u6bd4 <a href=\"https:\/\/nodemaven.com\/zh\/blog\/web-scraping-tools\/\">\u7f51\u9875\u6293\u53d6\u5de5\u5177<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-7-add-price-drop-alerts-and-scheduling\">\u7b2c 7 \u6b65\uff1a\u6dfb\u52a0\u964d\u4ef7\u63d0\u9192\u548c\u5b9a\u65f6\u4efb\u52a1<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u4e2a\u57fa\u672c\u7684\u63d0\u9192\u529f\u80fd\u53ef\u4ee5\u76f4\u63a5\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-add-a-target-price\">\u6dfb\u52a0\u4e00\u4e2a\u76ee\u6807\u4ef7\u683c<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c06\u4e0b\u9762\u8fd9\u6bb5\u4ee3\u7801\u6dfb\u52a0\u5230\u811a\u672c\u7684\u9876\u90e8\u9644\u8fd1\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"TARGET_PRICE%20%3D%2050.00\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u66f4\u65b0\u5176\u4e2d\u7684\u5faa\u73af <code>main()<\/code>:<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"if%20record%5B%22price%22%5D%20%3C%3D%20TARGET_PRICE%3A%0A%20%20%20%20print%28f%22Price%20alert%3A%20%7Brecord%5B%27title%27%5D%7D%20is%20now%20%7Brecord%5B%27price_text%27%5D%7D%22%29\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u76ee\u524d\u5b83\u8fd8\u4e0d\u4f1a\u53d1\u9001\u7535\u5b50\u90ae\u4ef6\u6216 Telegram \u6d88\u606f\uff0c\u53ea\u4f1a\u5728\u4ef7\u683c\u4f4e\u4e8e\u4f60\u8bbe\u5b9a\u7684\u76ee\u6807\u503c\u65f6\u6253\u5370\u4e00\u6761\u6d88\u606f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-schedule-the-tracker\">\u4e3a\u8ffd\u8e2a\u5668\u8bbe\u5b9a\u8ba1\u5212\u4efb\u52a1<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u7b80\u5355\u7684\u8bbe\u7f6e\uff0c\u4f60\u53ef\u4ee5\u6bcf\u5929\u624b\u52a8\u8fd0\u884c\u4e00\u6b21\u811a\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 macOS \u6216 Linux \u4e0a\uff0c\u4f60\u4e4b\u540e\u53ef\u4ee5\u4f7f\u7528 cron\u3002\u5728 Windows \u4e0a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 Task Scheduler\u3002\u5982\u679c\u4f60\u66f4\u559c\u6b22\u65e0\u4ee3\u7801\u7684\u8bbe\u7f6e\uff0c\u53ef\u4ee5\u5148\u4ece\u624b\u52a8\u8fd0\u884c\u5f00\u59cb\uff0c\u7b49\u811a\u672c\u80fd\u8fd4\u56de\u5e72\u51c0\u7684\u6570\u636e\u540e\u518d\u8fdb\u884c\u81ea\u52a8\u5316\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u771f\u5b9e\u7684\u4ef7\u683c\u76d1\u63a7\u5de5\u4f5c\u6d41\uff0c\u8bf7\u5b58\u50a8\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5e02\u573a<\/li>\n\n\n\n<li>\u5730\u533a\u6216 ZIP \u90ae\u7f16<\/li>\n\n\n\n<li>\u65f6\u95f4\u6233<\/li>\n\n\n\n<li>\u4ef7\u683c<\/li>\n\n\n\n<li>\u53ef\u7528\u6027<\/li>\n\n\n\n<li>\u4ea7\u54c1 URL<\/li>\n\n\n\n<li>\u9519\u8bef\u72b6\u6001\uff0c\u5982\u679c\u8bf7\u6c42\u5931\u8d25<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e9b\u989d\u5916\u7684\u80cc\u666f\u4fe1\u606f\u6709\u52a9\u4e8e\u89e3\u91ca\u4ef7\u683c\u4e3a\u4f55\u53d1\u751f\u53d8\u5316\u3002\u4ef7\u683c\u4e0b\u964d\u53ef\u80fd\u6e90\u4e8e\u771f\u5b9e\u7684\u6298\u6263\uff0c\u4f46\u4e5f\u53ef\u80fd\u6765\u81ea\u4e0d\u540c\u7684\u5730\u533a\u3001\u5356\u5bb6\u3001\u4f18\u60e0\u5238\u6216\u8fd0\u8d39\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-step-8-add-proxies-for-more-reliable-amazon-tracking\">\u7b2c 8 \u6b65\uff1a\u6dfb\u52a0\u4ee3\u7406\u4ee5\u83b7\u5f97\u66f4\u53ef\u9760\u7684 Amazon \u8ddf\u8e2a<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u505a\u51e0\u6b21\u624b\u52a8\u6d4b\u8bd5\u65f6\uff0c\u4f60\u6216\u8bb8\u4e0d\u9700\u8981\u4ee3\u7406\u3002\u4f46\u4e00\u65e6\u8ffd\u8e2a\u5668\u8fd0\u884c\u5f97\u66f4\u9891\u7e41\u3001\u68c0\u67e5\u591a\u4e2a\u5546\u54c1\u6216\u6309\u5730\u533a\u6bd4\u8f83\u4ef7\u683c\uff0c\u5355\u4e00\u7684\u672c\u5730 IP \u5c31\u4f1a\u6210\u4e3a\u8584\u5f31\u73af\u8282\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Amazon \u53ef\u80fd\u4f1a\u6839\u636e\u53ef\u89c1\u7684\u4f4d\u7f6e\u663e\u793a\u4e0d\u540c\u7684\u5546\u54c1\u6570\u636e\u3002\u5f53\u8bf7\u6c42\u6a21\u5f0f\u770b\u8d77\u6765\u5f02\u5e38\u65f6\uff0c\u5b83\u8fd8\u53ef\u80fd\u8fd4\u56de CAPTCHA\u3001\u4e0d\u53ef\u7528\u7684\u9875\u9762\u6216\u4e0d\u4e00\u81f4\u7684\u914d\u9001\u8be6\u60c5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6b63\u662f <strong><a href=\"https:\/\/nodemaven.com\/zh\/proxies\/residential-proxies\/\" data-type=\"proxies\" data-id=\"36421\">\u5e72\u51c0\u7684\u4f4f\u5b85\u4ee3\u7406<\/a><\/strong> \u548c <strong>\u7c98\u6027\u4f1a\u8bdd<\/strong> \u5f88\u6709\u5e2e\u52a9\u3002\u5b83\u4eec\u8ba9\u8ddf\u8e2a\u5668\u4fdd\u6301\u7a33\u5b9a\u7684\u5730\u533a\uff0c\u907f\u514d\u5c06\u6bcf\u4e2a\u8bf7\u6c42\u90fd\u901a\u8fc7\u540c\u4e00\u4e2a\u672c\u5730 IP \u53d1\u51fa\u3002<\/p>\n\n\n<div\n\t\t\t\n\t\t\tclass=\"so-widget-rhinocore-addons-rhino-alert-banner so-widget-rhinocore-addons-rhino-alert-banner-default-d75171398898\"\n\t\t\t\n\t\t><div class=\"rhino-widget rhino-widget--rhinocore-addons-rhino-alert-banner section-alert\"    style=\"--alert-background-color: #E6E6FF\"\n>\n            <div class=\"section-alert__icon\">\n            <img decoding=\"async\" src=\"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/02\/icon-4.svg\" alt=\"\" loading=\"lazy\" width=\"64\" height=\"64\">        <\/div>\n    \n            <div class=\"section-alert__main\">\n                            <div class=\"section-alert__title\">\u4ee5\u66f4\u5c11\u7684\u5931\u8d25\u8bf7\u6c42\u8ffd\u8e2a\u672c\u5730 Amazon \u4ef7\u683c<\/div>\n            \n                            <div class=\"section-alert__description\"><p><span style=\"font-weight: 400\">NodeMaven \u4f4f\u5b85\u4ee3\u7406\u53ef\u5e2e\u52a9 Python \u6293\u53d6\u7a0b\u5e8f\u4ee5\u66f4\u5e72\u51c0\u7684 IP\u3001\u7a33\u5b9a\u7684\u4f1a\u8bdd\u548c\u5730\u7406\u5b9a\u4f4d\u6765\u6536\u96c6 Amazon \u4ef7\u683c\u6570\u636e\uff0c\u7528\u4e8e\u533a\u57df\u4ef7\u683c\u6838\u67e5\u3002\u4ece\u4ee5\u4e0b\u5185\u5bb9\u5f00\u59cb <b>750 MB \u4ec5\u9700 $3.50<\/b>.<\/span><\/p>\n<\/div>\n                    <\/div>\n    \n            <a\n            class=\"section-alert__button b-btn b-btn--static-xl b-btn--secondary-black\"\n            href=\"https:\/\/dashboard.nodemaven.com\/checkout\/pag\/trial\"\n            >\n            \u7acb\u5373\u8bd5\u7528        <\/a>\n    <\/div>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">\u5177\u4f53\u9488\u5bf9 Amazon\uff0cNodeMaven \u7684 <a href=\"https:\/\/nodemaven.com\/zh\/websites\/amazon-proxy\/\">Amazon \u4ee3\u7406<\/a> \u5728\u4ee5\u4e0b\u60c5\u51b5\u4e0b\u4f1a\u5f88\u6709\u7528\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7279\u5b9a\u5730\u533a\u7684\u4ef7\u683c<\/strong><\/li>\n\n\n\n<li><strong>ZIP \u7ea7\u522b\u5b9a\u4f4d<\/strong><\/li>\n\n\n\n<li><strong>\u9002\u5408\u91cd\u590d\u68c0\u67e5\u7684\u7a33\u5b9a\u4f1a\u8bdd<\/strong><\/li>\n\n\n\n<li><strong>IP \u8d28\u91cf\u6bd4\u516c\u5171\u4ee3\u7406\u6216\u5ec9\u4ef7 VPN \u66f4\u7eaf\u51c0<\/strong><\/li>\n\n\n\n<li><strong>\u770b\u8d77\u6765\u66f4\u63a5\u8fd1\u6b63\u5e38\u7528\u6237\u6d41\u91cf\u7684\u4f4f\u5b85 IP<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u9700\u66f4\u6df1\u5165\u7684\u4ee3\u7406\u8bbe\u7f6e\uff0c\u8bf7\u9605\u8bfb NodeMaven \u5173\u4e8e\u6784\u5efa <a href=\"https:\/\/nodemaven.com\/zh\/blog\/how-to-build-reliable-web-scraping-proxy-pool\/\">\u53ef\u9760\u7684\u7f51\u9875\u6293\u53d6\u4ee3\u7406\u6c60<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-add-a-proxy-to-the-script\">\u4e3a\u811a\u672c\u6dfb\u52a0\u4ee3\u7406<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u60f3\u4f7f\u7528\u4ee3\u7406\uff0c\u8bf7\u66ff\u6362\u524d\u9762\u7684 <code>fetch_page()<\/code> \u5728\u6b64\u7248\u672c\u4e0b\u8fd0\u884c\u3002<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"PROXIES%20%3D%20%7B%0A%20%20%20%20%22http%22%3A%20%22http%3A%2F%2FUSERNAME%3APASSWORD%40gate.nodemaven.com%3A8080%22%2C%0A%20%20%20%20%22https%22%3A%20%22http%3A%2F%2FUSERNAME%3APASSWORD%40gate.nodemaven.com%3A8080%22%2C%0A%7D%0A%0A%0Adef%20fetch_page%28url%2C%20proxies%3DNone%29%3A%0A%20%20%20%20response%20%3D%20requests.get%28%0A%20%20%20%20%20%20%20%20url%2C%0A%20%20%20%20%20%20%20%20headers%3DHEADERS%2C%0A%20%20%20%20%20%20%20%20proxies%3Dproxies%2C%0A%20%20%20%20%20%20%20%20timeout%3D30%2C%0A%20%20%20%20%29%0A%0A%20%20%20%20response.raise_for_status%28%29%0A%0A%20%20%20%20html%20%3D%20response.text.lower%28%29%0A%20%20%20%20captcha_markers%20%3D%20%5B%0A%20%20%20%20%20%20%20%20%22captcha%22%2C%0A%20%20%20%20%20%20%20%20%22sorry%2C%20we%20just%20need%20to%20make%20sure%22%2C%0A%20%20%20%20%20%20%20%20%22robot%20check%22%2C%0A%20%20%20%20%5D%0A%0A%20%20%20%20if%20any%28marker%20in%20html%20for%20marker%20in%20captcha_markers%29%3A%0A%20%20%20%20%20%20%20%20raise%20RuntimeError%28%22Amazon%20returned%20a%20CAPTCHA%20or%20verification%20page.%22%29%0A%0A%20%20%20%20return%20response.text\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u5c06\u4ee3\u7406\u4f20\u5165 <code>scrape_product()<\/code>:<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"record%20%3D%20scrape_product%28url%2C%20proxies%3DPROXIES%29\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8981\u5c06\u771f\u5b9e\u7684\u4ee3\u7406\u51ed\u636e\u786c\u7f16\u7801\u5728\u5171\u4eab\u6587\u4ef6\u6216\u516c\u5171\u4ed3\u5e93\u4e2d\u3002\u5982\u679c\u811a\u672c\u5c06\u5b58\u50a8\u5728 GitHub \u4e0a\u6216\u4f9b\u56e2\u961f\u4f7f\u7528\uff0c\u8bf7\u4f7f\u7528\u73af\u5883\u53d8\u91cf\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-choose-the-right-proxy-session\">\u9009\u62e9\u5408\u9002\u7684\u4ee3\u7406\u4f1a\u8bdd<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528 <strong>\u7c98\u6027\u4f4f\u5b85\u4f1a\u8bdd<\/strong> \u5f53\u4f60\u5e0c\u671b\u5728\u4e00\u6b21\u8ddf\u8e2a\u8fd0\u884c\u671f\u95f4\u8ba9\u67d0\u4e2a\u4ea7\u54c1\u6216\u67d0\u4e2a\u5730\u533a\u4fdd\u6301\u4e00\u81f4\u65f6\u3002\u5f53 Amazon \u5b58\u50a8\u4f4d\u7f6e\u8bbe\u7f6e\u3001\u914d\u9001\u72b6\u6001\u6216 cookie \u65f6\uff0c\u8fd9\u4e00\u70b9\u975e\u5e38\u6709\u7528\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ec5\u5728\u6bcf\u4e2a\u8bf7\u6c42\u76f8\u4e92\u72ec\u7acb\u65f6\u624d\u4f7f\u7528\u8f6e\u6362\u3002\u5728\u540c\u4e00\u4e2a\u5546\u54c1\u6d41\u7a0b\u4e2d\u968f\u673a\u5207\u6362 IP \u53ef\u80fd\u4f1a\u5bfc\u81f4\u4ef7\u683c\u4e0d\u5339\u914d\u3001\u989d\u5916\u7684\u9a8c\u8bc1\u6216\u7ed3\u679c\u4e0d\u4e00\u81f4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NodeMaven \u7684\u6307\u5357\uff1a <a href=\"https:\/\/nodemaven.com\/zh\/blog\/mobile-vs-residential-vs-datacenter-proxies-whats-the-difference\/\">\u4f4f\u5b85\u3001\u79fb\u52a8\u548c\u6570\u636e\u4e2d\u5fc3\u4ee3\u7406<\/a> \u89e3\u91ca\u4e86\u54ea\u79cd\u4ee3\u7406\u7c7b\u578b\u9002\u5408\u4e0d\u540c\u7684\u6293\u53d6\u5de5\u4f5c\u6d41\u7a0b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-common-amazon-price-tracker-errors-and-fixes\">\u5e38\u89c1\u7684 Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668\u9519\u8bef\u53ca\u4fee\u590d\u65b9\u6cd5<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-amazon-returns-a-503-or-403-error\">Amazon \u8fd4\u56de 503 \u6216 403 \u9519\u8bef<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53 Amazon \u4e0d\u559c\u6b22\u8bf7\u6c42\u6a21\u5f0f\u3001IP \u4fe1\u8a89\u3001\u8bf7\u6c42\u5934\u6216\u6d41\u91cf\u6765\u6e90\u65f6\uff0c\u5c31\u53ef\u80fd\u62d2\u7edd\u8be5\u8bf7\u6c42\u3002\u5f00\u53d1\u8005\u4e5f\u5728 Stack Overflow \u7684\u8ba8\u8bba\u5e16\u4e2d\u8c08\u5230\u8fd9\u4e00\u70b9 <a href=\"https:\/\/stackoverflow.com\/questions\/48992650\/amazon-price-web-scraping-with-python-requests-and-bs4\">\u4f7f\u7528 Requests \u548c BeautifulSoup \u65f6\u51fa\u73b0\u7684 Amazon 503 \u9519\u8bef<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf7\u5c1d\u8bd5\u4ee5\u4e0b\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u964d\u4f4e\u8bf7\u6c42\u901f\u7387\u3002<\/li>\n\n\n\n<li>\u68c0\u67e5\u4f60\u7684\u8bf7\u6c42\u5934\u662f\u5426\u5df2\u8bbe\u7f6e\u3002<\/li>\n\n\n\n<li>\u4fdd\u5b58\u8fd4\u56de\u7684 HTML \u5e76\u8fdb\u884c\u68c0\u67e5\u3002<\/li>\n\n\n\n<li>\u907f\u514d\u4ece\u8d28\u91cf\u5dee\u6216\u88ab\u8fc7\u5ea6\u4f7f\u7528\u7684 IP \u53cd\u590d\u53d1\u8d77\u8bf7\u6c42\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u8ffd\u8e2a\u5668\u4ee5\u8f83\u9ad8\u7684\u91cf\u7ea7\u8fd0\u884c\uff0c\u8bf7\u4f7f\u7528\u5e72\u51c0\u7684\u4f4f\u5b85\u4ee3\u7406\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-amazon-shows-a-captcha-page\">Amazon \u663e\u793a CAPTCHA \u9875\u9762<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c Amazon \u8fd4\u56de\u4e00\u4e2a CAPTCHA \u9875\u9762\uff0c\u8bf4\u660e\u6293\u53d6\u7a0b\u5e8f\u6536\u5230\u7684\u662f\u9a8c\u8bc1 HTML\uff0c\u800c\u4e0d\u662f\u4ea7\u54c1 HTML\u3002\u672c\u6559\u7a0b\u4e2d\u7684\u811a\u672c\u4f1a\u68c0\u6d4b\u5e38\u89c1\u7684 CAPTCHA \u6587\u672c\u5e76\u629b\u51fa\u9519\u8bef\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u65f6\uff0c\u8bf7\u964d\u4f4e\u8bf7\u6c42\u9891\u7387\uff0c\u5e76\u68c0\u67e5\u4f60\u7684\u8bf7\u6c42\u5934\u3001\u4f1a\u8bdd\u884c\u4e3a\u548c\u4ee3\u7406\u8d28\u91cf\u662f\u5426\u4e0e\u4f60\u6b63\u5728\u8fd0\u884c\u7684\u8bf7\u6c42\u91cf\u76f8\u5339\u914d\u3002 <strong>\u5e72\u51c0\u7684\u4f4f\u5b85\u4ee3\u7406\u6709\u52a9\u4e8e\u51cf\u5c11\u56e0 IP \u4fe1\u8a89\u4e0d\u4f73\u800c\u89e6\u53d1\u7684 CAPTCHA<\/strong>\uff0c\u4f46\u5b83\u4eec\u5e76\u4e0d\u80fd\u66ff\u4ee3\u5408\u7406\u7684\u8bf7\u6c42\u65f6\u673a\u5b89\u6392\u6216\u54cd\u5e94\u9a8c\u8bc1\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8981\u5c06 CAPTCHA \u9875\u9762\u4fdd\u5b58\u4e3a\u4ea7\u54c1\u6570\u636e\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-title-is-missing\">\u6807\u9898\u7f3a\u5931<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u811a\u672c\u627e\u4e0d\u5230\u6807\u9898\uff0c\u8bf7\u518d\u6b21\u68c0\u67e5\u5546\u54c1\u9875\u9762\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u7528\u7684\u9009\u62e9\u5668\u662f\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"%22%23productTitle%22\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u9875\u9762\u4f7f\u7528\u4e86\u4e0d\u540c\u7684\u5e03\u5c40\uff0c\u8bf7\u518d\u6dfb\u52a0\u4e00\u4e2a\u9009\u62e9\u5668\u5230 <code>TITLE_SELECTORS<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u65f6\u68c0\u67e5\u8fd4\u56de\u7684 HTML \u662f\u5426\u786e\u5b9e\u662f\u4ea7\u54c1\u9875\u9762\u3002\u6709\u65f6\u811a\u672c\u6536\u5230\u7684\u662f\u540c\u610f\u9875\u9762\u3001\u8df3\u8f6c\u9875\u9762\u6216\u9a8c\u8bc1\u9875\u9762\uff0c\u800c\u4e0d\u662f\u4ea7\u54c1\u9875\u9762\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-price-is-missing\">\u4ef7\u683c\u7f3a\u5931<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Amazon \u7684\u4ef7\u683c\u53ef\u80fd\u51fa\u73b0\u5728\u9875\u9762\u7684\u4e0d\u540c\u90e8\u5206\u3002\u6709\u4e9b\u9875\u9762\u4f7f\u7528\u5c4f\u5e55\u5916\u7684\u4ef7\u683c\u6587\u672c\uff0c\u800c\u53e6\u4e00\u4e9b\u9875\u9762\u5219\u5c06\u53ef\u89c1\u4ef7\u683c\u62c6\u5206\u4e3a\u7b26\u53f7\u3001\u6574\u6570\u548c\u5c0f\u6570\u90e8\u5206\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5c31\u662f\u811a\u672c\u540c\u65f6\u4f7f\u7528\u4e24\u8005\u7684\u539f\u56e0\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"PRICE_SELECTORS\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u53ca\uff1a<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"split_price_text%28%29\"><\/code><\/pre><\/figure>\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4e24\u8005\u90fd\u5931\u8d25\uff0c\u8bf7\u4fdd\u5b58 HTML \u5e76\u624b\u52a8\u68c0\u67e5\u4ef7\u683c\u90e8\u5206\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-price-is-different-from-your-browser\">\u4ef7\u683c\u4e0e\u4f60\u6d4f\u89c8\u5668\u4e2d\u663e\u793a\u7684\u4e0d\u540c<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Amazon \u7684\u4ef7\u683c\u53ef\u80fd\u4f1a\u56e0\u56fd\u5bb6\/\u5730\u533a\u3001ZIP \u90ae\u7f16\u3001\u914d\u9001\u5730\u70b9\u3001\u7ad9\u70b9\u3001cookie \u4ee5\u53ca\u767b\u5f55\u72b6\u6001\u800c\u6709\u6240\u4e0d\u540c\u3002\u67d0\u4ef6\u5546\u54c1\u8fd8\u53ef\u80fd\u663e\u793a\u4f18\u60e0\u5238\u3001\u9650\u65f6\u6298\u6263\u6216\u4e0d\u540c\u7684\u8d2d\u4e70\u9009\u9879\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e3a\u4e86\u51cf\u5c11\u4e0d\u5339\u914d\u7684\u60c5\u51b5\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4fdd\u6301\u5730\u533a\u4e00\u81f4\u3002<\/strong><\/li>\n\n\n\n<li>\u5c06\u5e02\u573a\u548c\u5730\u533a\u5b58\u50a8\u5728\u4f60\u7684 CSV \u4e2d\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u5730\u70b9\u4e00\u81f4\u6027\u5f88\u91cd\u8981\uff0c\u8bf7\u4f7f\u7528\u7c98\u6027\u4f1a\u8bdd\u3002<\/li>\n\n\n\n<li>\u5728\u6bd4\u8f83\u4ef7\u683c\u4e4b\u524d\uff0c\u5148\u6bd4\u8f83\u53ef\u89c1\u7684 IP \u548c\u4f4d\u7f6e\u3002<\/li>\n\n\n\n<li>\u5f53\u53d1\u8d27\u4f4d\u7f6e\u4f1a\u5f71\u54cd\u7ed3\u679c\u65f6\uff0c\u8bf7\u4f7f\u7528 ZIP \u7ea7\u5b9a\u4f4d\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">NodeMaven \u652f\u6301\u7cbe\u786e\u7684\u5730\u7406\u5b9a\u4f4d\uff0c\u5305\u62ec <a href=\"https:\/\/nodemaven.com\/zh\/features\/zip-level-targeting\/\">ZIP \u7ea7\u522b\u5b9a\u4f4d<\/a>\uff0c\u5f53\u8ddf\u8e2a\u5668\u9700\u8981\u4ece\u7279\u5b9a\u7684\u4e70\u5bb6\u6240\u5728\u5730\u6bd4\u8f83 Amazon \u7684\u4ef7\u683c\u3001\u5e93\u5b58\u548c\u914d\u9001\u9009\u9879\u65f6\uff0c\u8fd9\u4e00\u70b9\u975e\u5e38\u6709\u7528\u3002<\/p>\n\n\n<div\n\t\t\t\n\t\t\tclass=\"so-widget-rhinocore-addons-rhino-alert-banner so-widget-rhinocore-addons-rhino-alert-banner-default-d75171398898\"\n\t\t\t\n\t\t><div class=\"rhino-widget rhino-widget--rhinocore-addons-rhino-alert-banner section-alert\"    style=\"--alert-background-color: #E6E6FF\"\n>\n            <div class=\"section-alert__icon\">\n            <img decoding=\"async\" src=\"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/02\/icon-4.svg\" alt=\"\" loading=\"lazy\" width=\"64\" height=\"64\">        <\/div>\n    \n            <div class=\"section-alert__main\">\n                            <div class=\"section-alert__title\">\u4ee5\u66f4\u5c11\u7684\u5931\u8d25\u8bf7\u6c42\u8ffd\u8e2a\u672c\u5730 Amazon \u4ef7\u683c<\/div>\n            \n                            <div class=\"section-alert__description\"><p><span style=\"font-weight: 400\">NodeMaven \u4f4f\u5b85\u4ee3\u7406\u53ef\u5e2e\u52a9 Python \u6293\u53d6\u7a0b\u5e8f\u4ee5\u66f4\u5e72\u51c0\u7684 IP\u3001\u7a33\u5b9a\u7684\u4f1a\u8bdd\u548c\u5730\u7406\u5b9a\u4f4d\u6765\u6536\u96c6 Amazon \u4ef7\u683c\u6570\u636e\uff0c\u7528\u4e8e\u533a\u57df\u4ef7\u683c\u6838\u67e5\u3002\u4ece\u4ee5\u4e0b\u5185\u5bb9\u5f00\u59cb <b>750 MB \u4ec5\u9700 $3.50<\/b>.<\/span><\/p>\n<\/div>\n                    <\/div>\n    \n            <a\n            class=\"section-alert__button b-btn b-btn--static-xl b-btn--secondary-black\"\n            href=\"https:\/\/dashboard.nodemaven.com\/checkout\/pag\/trial\"\n            >\n            \u7acb\u5373\u8bd5\u7528        <\/a>\n    <\/div>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c Requests \u65e0\u6cd5\u8bbf\u95ee\u53ef\u89c1\u7684\u9875\u9762\u5185\u5bb9\uff0c <a href=\"https:\/\/nodemaven.com\/zh\/blog\/selenium-scraping\/\">Selenium \u722c\u53d6<\/a> \u53ef\u80fd\u662f\u66f4\u597d\u7684\u9009\u62e9\uff0c\u56e0\u4e3a\u5b83\u4f1a\u6253\u5f00\u4e00\u4e2a\u6d4f\u89c8\u5668\u5e76\u5904\u7406\u5df2\u6e32\u67d3\u7684\u9875\u9762\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-full-amazon-price-tracker-code\">\u5b8c\u6574\u7684 Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668\u4ee3\u7801<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684\u811a\u672c\u3002<\/p>\n\n\n<figure class=\"rhino-code-snippet\" data-lang=\"python\"><button type=\"button\" class=\"rhino-code-snippet__copy\" aria-label=\"Copy code to clipboard\"><svg class=\"rhino-code-snippet__icon-copy\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"><\/rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"><\/path><\/svg><svg class=\"rhino-code-snippet__icon-check\" viewbox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg><\/button><span class=\"rhino-code-snippet__sr\" aria-live=\"polite\"><\/span><pre class=\"line-numbers\"><code class=\"language-python\" data-rhino-code=\"import%20csv%0Aimport%20re%0Afrom%20datetime%20import%20datetime%0Afrom%20pathlib%20import%20Path%0Afrom%20time%20import%20sleep%0A%0Aimport%20requests%0Afrom%20bs4%20import%20BeautifulSoup%0A%0A%0APRODUCT_URLS%20%3D%20%5B%0A%20%20%20%20%22https%3A%2F%2Fwww.amazon.com%2Fdp%2FASIN1%22%2C%0A%20%20%20%20%22https%3A%2F%2Fwww.amazon.com%2Fdp%2FASIN2%22%2C%0A%5D%0A%0ATARGET_PRICE%20%3D%2050.00%0ACSV_FILE%20%3D%20Path%28%22amazon_price_history.csv%22%29%0A%0AHEADERS%20%3D%20%7B%0A%20%20%20%20%22User-Agent%22%3A%20%28%0A%20%20%20%20%20%20%20%20%22Mozilla%2F5.0%20%28Windows%20NT%2010.0%3B%20Win64%3B%20x64%29%20%22%0A%20%20%20%20%20%20%20%20%22AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20%22%0A%20%20%20%20%20%20%20%20%22Chrome%2F126.0.0.0%20Safari%2F537.36%22%0A%20%20%20%20%29%2C%0A%20%20%20%20%22Accept-Language%22%3A%20%22en-US%2Cen%3Bq%3D0.9%22%2C%0A%7D%0A%0ATITLE_SELECTORS%20%3D%20%5B%0A%20%20%20%20%22%23productTitle%22%2C%0A%5D%0A%0APRICE_SELECTORS%20%3D%20%5B%0A%20%20%20%20%22%23corePrice_feature_div%20.a-price%20.a-offscreen%22%2C%0A%20%20%20%20%22%23apex_desktop%20.a-price%20.a-offscreen%22%2C%0A%20%20%20%20%22.a-price%20.a-offscreen%22%2C%0A%20%20%20%20%22%23priceblock_ourprice%22%2C%0A%20%20%20%20%22%23priceblock_dealprice%22%2C%0A%5D%0A%0AAVAILABILITY_SELECTORS%20%3D%20%5B%0A%20%20%20%20%22%23availability%22%2C%0A%5D%0A%0AFIELDNAMES%20%3D%20%5B%0A%20%20%20%20%22timestamp%22%2C%0A%20%20%20%20%22title%22%2C%0A%20%20%20%20%22price_text%22%2C%0A%20%20%20%20%22price%22%2C%0A%20%20%20%20%22availability%22%2C%0A%20%20%20%20%22url%22%2C%0A%5D%0A%0APROXIES%20%3D%20None%0A%0A%23%20To%20use%20a%20proxy%2C%20replace%20None%20above%20with%20this%20structure%3A%0A%23%20PROXIES%20%3D%20%7B%0A%23%20%20%20%20%20%22http%22%3A%20%22http%3A%2F%2FUSERNAME%3APASSWORD%40gate.nodemaven.com%3A8080%22%2C%0A%23%20%20%20%20%20%22https%22%3A%20%22http%3A%2F%2FUSERNAME%3APASSWORD%40gate.nodemaven.com%3A8080%22%2C%0A%23%20%7D%0A%0A%0Adef%20fetch_page%28url%2C%20proxies%3DNone%29%3A%0A%20%20%20%20response%20%3D%20requests.get%28%0A%20%20%20%20%20%20%20%20url%2C%0A%20%20%20%20%20%20%20%20headers%3DHEADERS%2C%0A%20%20%20%20%20%20%20%20proxies%3Dproxies%2C%0A%20%20%20%20%20%20%20%20timeout%3D30%2C%0A%20%20%20%20%29%0A%0A%20%20%20%20response.raise_for_status%28%29%0A%0A%20%20%20%20html%20%3D%20response.text.lower%28%29%0A%20%20%20%20captcha_markers%20%3D%20%5B%0A%20%20%20%20%20%20%20%20%22captcha%22%2C%0A%20%20%20%20%20%20%20%20%22sorry%2C%20we%20just%20need%20to%20make%20sure%22%2C%0A%20%20%20%20%20%20%20%20%22robot%20check%22%2C%0A%20%20%20%20%5D%0A%0A%20%20%20%20if%20any%28marker%20in%20html%20for%20marker%20in%20captcha_markers%29%3A%0A%20%20%20%20%20%20%20%20raise%20RuntimeError%28%22Amazon%20returned%20a%20CAPTCHA%20or%20verification%20page.%22%29%0A%0A%20%20%20%20return%20response.text%0A%0A%0Adef%20save_debug_html%28html%2C%20filename%3D%22debug_amazon_page.html%22%29%3A%0A%20%20%20%20Path%28filename%29.write_text%28html%2C%20encoding%3D%22utf-8%22%29%0A%0A%0Adef%20first_text%28soup%2C%20selectors%29%3A%0A%20%20%20%20for%20selector%20in%20selectors%3A%0A%20%20%20%20%20%20%20%20element%20%3D%20soup.select_one%28selector%29%0A%20%20%20%20%20%20%20%20if%20element%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20text%20%3D%20element.get_text%28%22%20%22%2C%20strip%3DTrue%29%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20text%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20text%0A%0A%20%20%20%20return%20None%0A%0A%0Adef%20split_price_text%28soup%29%3A%0A%20%20%20%20price%20%3D%20%28%0A%20%20%20%20%20%20%20%20soup.select_one%28%22%23corePrice_feature_div%20.a-price%22%29%0A%20%20%20%20%20%20%20%20or%20soup.select_one%28%22%23apex_desktop%20.a-price%22%29%0A%20%20%20%20%20%20%20%20or%20soup.select_one%28%22.a-price%22%29%0A%20%20%20%20%29%0A%0A%20%20%20%20if%20not%20price%3A%0A%20%20%20%20%20%20%20%20return%20None%0A%0A%20%20%20%20symbol%20%3D%20price.select_one%28%22.a-price-symbol%22%29%0A%20%20%20%20whole%20%3D%20price.select_one%28%22.a-price-whole%22%29%0A%20%20%20%20fraction%20%3D%20price.select_one%28%22.a-price-fraction%22%29%0A%0A%20%20%20%20if%20not%20whole%3A%0A%20%20%20%20%20%20%20%20return%20None%0A%0A%20%20%20%20symbol_text%20%3D%20symbol.get_text%28strip%3DTrue%29%20if%20symbol%20else%20%22%22%0A%20%20%20%20whole_text%20%3D%20whole.get_text%28strip%3DTrue%29.replace%28%22.%22%2C%20%22%22%29%0A%20%20%20%20fraction_text%20%3D%20fraction.get_text%28strip%3DTrue%29%20if%20fraction%20else%20%2200%22%0A%0A%20%20%20%20return%20f%22%7Bsymbol_text%7D%7Bwhole_text%7D.%7Bfraction_text%7D%22%0A%0A%0Adef%20parse_price%28price_text%29%3A%0A%20%20%20%20if%20not%20price_text%3A%0A%20%20%20%20%20%20%20%20return%20None%0A%0A%20%20%20%20match%20%3D%20re.search%28r%22%28%5Cd%2B%5B%5Cd%2C%5D%2A%5C.%3F%5Cd%2A%29%22%2C%20price_text.replace%28%22%2C%22%2C%20%22%22%29%29%0A%0A%20%20%20%20if%20not%20match%3A%0A%20%20%20%20%20%20%20%20return%20None%0A%0A%20%20%20%20return%20float%28match.group%281%29%29%0A%0A%0Adef%20scrape_product%28url%2C%20proxies%3DNone%29%3A%0A%20%20%20%20html%20%3D%20fetch_page%28url%2C%20proxies%3Dproxies%29%0A%20%20%20%20soup%20%3D%20BeautifulSoup%28html%2C%20%22lxml%22%29%0A%0A%20%20%20%20title%20%3D%20first_text%28soup%2C%20TITLE_SELECTORS%29%0A%20%20%20%20price_text%20%3D%20first_text%28soup%2C%20PRICE_SELECTORS%29%20or%20split_price_text%28soup%29%0A%20%20%20%20availability%20%3D%20first_text%28soup%2C%20AVAILABILITY_SELECTORS%29%0A%20%20%20%20price%20%3D%20parse_price%28price_text%29%0A%0A%20%20%20%20if%20not%20title%3A%0A%20%20%20%20%20%20%20%20save_debug_html%28html%29%0A%20%20%20%20%20%20%20%20raise%20ValueError%28%22Product%20title%20was%20not%20found.%20Check%20debug_amazon_page.html.%22%29%0A%0A%20%20%20%20if%20price%20is%20None%3A%0A%20%20%20%20%20%20%20%20save_debug_html%28html%29%0A%20%20%20%20%20%20%20%20raise%20ValueError%28%22Product%20price%20was%20not%20found.%20Check%20debug_amazon_page.html.%22%29%0A%0A%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20%22timestamp%22%3A%20datetime.utcnow%28%29.isoformat%28timespec%3D%22seconds%22%29%2C%0A%20%20%20%20%20%20%20%20%22title%22%3A%20title%2C%0A%20%20%20%20%20%20%20%20%22price_text%22%3A%20price_text%2C%0A%20%20%20%20%20%20%20%20%22price%22%3A%20price%2C%0A%20%20%20%20%20%20%20%20%22availability%22%3A%20availability%20or%20%22Unknown%22%2C%0A%20%20%20%20%20%20%20%20%22url%22%3A%20url%2C%0A%20%20%20%20%7D%0A%0A%0Adef%20save_to_csv%28record%29%3A%0A%20%20%20%20file_exists%20%3D%20CSV_FILE.exists%28%29%0A%0A%20%20%20%20with%20CSV_FILE.open%28%22a%22%2C%20newline%3D%22%22%2C%20encoding%3D%22utf-8%22%29%20as%20file%3A%0A%20%20%20%20%20%20%20%20writer%20%3D%20csv.DictWriter%28file%2C%20fieldnames%3DFIELDNAMES%29%0A%0A%20%20%20%20%20%20%20%20if%20not%20file_exists%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20writer.writeheader%28%29%0A%0A%20%20%20%20%20%20%20%20writer.writerow%28record%29%0A%0A%0Adef%20main%28%29%3A%0A%20%20%20%20for%20url%20in%20PRODUCT_URLS%3A%0A%20%20%20%20%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20record%20%3D%20scrape_product%28url%2C%20proxies%3DPROXIES%29%0A%20%20%20%20%20%20%20%20%20%20%20%20save_to_csv%28record%29%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20print%28%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22%7Brecord%5B%27title%27%5D%7D%20%7C%20%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22%7Brecord%5B%27price_text%27%5D%7D%20%7C%20%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22%7Brecord%5B%27availability%27%5D%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%29%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20record%5B%22price%22%5D%20%3C%3D%20TARGET_PRICE%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20print%28f%22Price%20alert%3A%20%7Brecord%5B%27title%27%5D%7D%20is%20now%20%7Brecord%5B%27price_text%27%5D%7D%22%29%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20sleep%2810%29%0A%0A%20%20%20%20%20%20%20%20except%20Exception%20as%20error%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20print%28f%22Failed%20to%20track%20%7Burl%7D%3A%20%7Berror%7D%22%29%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20main%28%29\"><\/code><\/pre><\/figure>\n\n\n<h2 class=\"wp-block-heading\">NodeMaven \u5982\u4f55\u6539\u8fdb Amazon \u4ef7\u683c\u8ffd\u8e2a<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u722c\u866b\u4fdd\u6301\u7a33\u5b9a\u7684\u8fde\u63a5\u65f6\uff0cAmazon \u4ef7\u683c\u8ffd\u8e2a\u4f1a\u66f4\u52a0\u53ef\u9760 <strong>\u4e00\u81f4\u7684\u5730\u7406\u4f4d\u7f6e\u3001\u5e72\u51c0\u7684 IP \u4fe1\u8a89\u4ee5\u53ca\u7a33\u5b9a\u7684\u4f1a\u8bdd\u884c\u4e3a<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NodeMaven \u53ef\u4ee5\u89e3\u51b3\u90a3\u4e9b\u901a\u5e38\u4f1a\u5bfc\u81f4\u4ef7\u683c\u8ffd\u8e2a\u5668\u5931\u6548\u7684\u73af\u8282\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4f4f\u5b85\u4ee3\u7406\uff1a<\/strong> \u4f7f\u7528\u771f\u5b9e\u7528\u6237\u7684 IP\uff0c\u800c\u4e0d\u662f\u5608\u6742\u7684 VPN \u6216\u6570\u636e\u4e2d\u5fc3\u5730\u5740\u3002<\/li>\n\n\n\n<li><strong>\u7c98\u6027\u4f1a\u8bdd\uff1a<\/strong> \u5728\u68c0\u67e5\u67d0\u4e2a\u4ea7\u54c1\u3001\u7c7b\u76ee\u6216\u533a\u57df\u6d41\u7a0b\u65f6\u4fdd\u6301\u540c\u4e00 IP\u3002<\/li>\n\n\n\n<li><strong>ZIP \u7ea7\u5b9a\u4f4d\uff1a<\/strong> \u4ece\u7279\u5b9a\u4e70\u5bb6\u6240\u5728\u5730\u6bd4\u8f83\u4ef7\u683c\u3001\u914d\u9001\u9009\u9879\u548c\u5e93\u5b58\u60c5\u51b5\u3002<\/li>\n\n\n\n<li><strong>\u5e72\u51c0\u7684 IP \u8d28\u91cf\uff1a<\/strong> \u51cf\u5c11\u5931\u8d25\u8bf7\u6c42\u3001CAPTCHA \u89e6\u53d1\u4ee5\u53ca\u4e0d\u53ef\u9760\u7684\u9875\u9762\u54cd\u5e94\u3002<\/li>\n\n\n\n<li><strong>\u7075\u6d3b\u7684\u8bbe\u7f6e\uff1a<\/strong> \u901a\u8fc7 Python\u3001\u6d4f\u89c8\u5668\u81ea\u52a8\u5316\u5de5\u5177\u6216\u6293\u53d6\u6280\u672f\u6808\u4f7f\u7528 HTTP \u6216 SOCKS5 \u4ee3\u7406\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e Amazon \u76d1\u63a7\u6765\u8bf4\uff0c\u8fd9\u610f\u5473\u7740\u66f4\u5c11\u7684\u533a\u57df\u7ed3\u679c\u4e0d\u5339\u914d\uff0c\u4ee5\u53ca\u66f4\u5e72\u51c0\u7684\u4ef7\u683c\u5386\u53f2\u8bb0\u5f55\u3002<\/p>\n\n\n<div\n\t\t\t\n\t\t\tclass=\"so-widget-rhinocore-addons-rhino-alert-banner so-widget-rhinocore-addons-rhino-alert-banner-default-d75171398898\"\n\t\t\t\n\t\t><div class=\"rhino-widget rhino-widget--rhinocore-addons-rhino-alert-banner section-alert\"    style=\"--alert-background-color: #E6E6FF\"\n>\n            <div class=\"section-alert__icon\">\n            <img decoding=\"async\" src=\"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/02\/icon-4.svg\" alt=\"\" loading=\"lazy\" width=\"64\" height=\"64\">        <\/div>\n    \n            <div class=\"section-alert__main\">\n                            <div class=\"section-alert__title\">\u4ee5\u66f4\u5c11\u7684\u5931\u8d25\u8bf7\u6c42\u8ffd\u8e2a\u672c\u5730 Amazon \u4ef7\u683c<\/div>\n            \n                            <div class=\"section-alert__description\"><p><span style=\"font-weight: 400\">NodeMaven \u4f4f\u5b85\u4ee3\u7406\u53ef\u5e2e\u52a9 Python \u6293\u53d6\u7a0b\u5e8f\u4ee5\u66f4\u5e72\u51c0\u7684 IP\u3001\u7a33\u5b9a\u7684\u4f1a\u8bdd\u548c\u5730\u7406\u5b9a\u4f4d\u6765\u6536\u96c6 Amazon \u4ef7\u683c\u6570\u636e\uff0c\u7528\u4e8e\u533a\u57df\u4ef7\u683c\u6838\u67e5\u3002\u4ece\u4ee5\u4e0b\u5185\u5bb9\u5f00\u59cb <b>750 MB \u4ec5\u9700 $3.50<\/b>.<\/span><\/p>\n<\/div>\n                    <\/div>\n    \n            <a\n            class=\"section-alert__button b-btn b-btn--static-xl b-btn--secondary-black\"\n            href=\"https:\/\/dashboard.nodemaven.com\/checkout\/pag\/trial\"\n            >\n            \u7acb\u5373\u8bd5\u7528        <\/a>\n    <\/div>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">\u7ed3\u8bba<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u4e2a\u7b80\u5355\u7684 Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668\u662f\u5f88\u597d\u7684\u5165\u95e8\u6293\u53d6\u9879\u76ee\uff0c\u56e0\u4e3a\u5b83\u5c55\u793a\u4e86\u5b8c\u6574\u7684\u5de5\u4f5c\u6d41\u7a0b\uff1a\u6293\u53d6\u9875\u9762\u3001\u68c0\u67e5\u9009\u62e9\u5668\u3001\u63d0\u53d6\u6570\u503c\u3001\u9a8c\u8bc1\u54cd\u5e94\u4ee5\u53ca\u4fdd\u5b58\u4ef7\u683c\u5386\u53f2\u3002\u5148\u4ece\u4e00\u4e24\u4e2a\u5546\u54c1\u5f00\u59cb\uff0c\u7136\u540e\u4ec5\u5728\u8ffd\u8e2a\u5668\u786e\u5b9e\u9700\u8981\u65f6\u518d\u6dfb\u52a0\u5b9a\u65f6\u4efb\u52a1\u3001\u63d0\u9192\u548c\u6d4f\u89c8\u5668\u6e32\u67d3\u529f\u80fd\u3002\u5bf9\u4e8e Amazon\uff0c <strong>\u4e00\u65e6\u4f60\u8d85\u8d8a\u6d4b\u8bd5\u9636\u6bb5\uff0c\u5e72\u51c0\u7684\u4ee3\u7406\u5c31\u53d8\u5f97\u81f3\u5173\u91cd\u8981<\/strong>\uff0c\u56e0\u4e3a\u4ef7\u683c\u3001\u5e93\u5b58\u3001\u9001\u8fbe\u65e5\u671f\u548c CAPTCHA \u51fa\u73b0\u9891\u7387\u90fd\u4f1a\u968f IP \u8d28\u91cf\u548c\u4f4d\u7f6e\u800c\u53d8\u5316\u3002NodeMaven \u4f4f\u5b85\u4ee3\u7406\u901a\u8fc7\u7c98\u6027\u4f1a\u8bdd\u548c ZIP \u7ea7\u5b9a\u4f4d\uff0c\u5e2e\u52a9\u8ffd\u8e2a\u4f1a\u8bdd\u4fdd\u6301\u66f4\u5e72\u51c0\u3001\u66f4\u7a33\u5b9a\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-faq\">\u5e38\u89c1\u95ee\u9898<\/h2>\n\n\n<div\n\t\t\t\n\t\t\tclass=\"so-widget-rhinocore-addons-faq so-widget-rhinocore-addons-faq-default-d75171398898\"\n\t\t\t\n\t\t>    <div class=\"rhino-widget rhino-widget--rhinocore-addons-faq section-faq\">\n        <div class=\"section-faq__list section-faq__list--columns-1\" role=\"list\" aria-label=\"\u5e38\u89c1\u95ee\u9898\">\n                            <div class=\"section-faq__column\">\n                                            <div class=\"section-faq__item\" data-accordion=\"wrapper\" data-accordion-group=\"faq\" role=\"listitem\">\n                            <h3 class=\"section-faq__heading\">\n                                <button class=\"section-faq__trigger\" data-accordion=\"trigger\" type=\"button\" aria-expanded=\"false\">\n                                    <span class=\"section-faq__question\">\u6211\u53ef\u4ee5\u7528 Python \u6784\u5efa\u4e00\u4e2a Amazon \u4ef7\u683c\u8ddf\u8e2a\u5668\u5417\uff1f<\/span>\n                                    <svg width=\"28\" height=\"28\" viewbox=\"0 0 28 28\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\">\n                                        <path d=\"M7 10.5L14 17.5L21 10.5\" stroke=\"#5D5D5D\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                                    <\/svg>\n                                <\/button>\n                            <\/h3>\n                            <div class=\"section-faq__content\">\n                                <div class=\"section-faq__answer\">\n                                    <p data-pm-slice=\"1 1 []\">\u53ef\u4ee5\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 Python \u642d\u914d Requests\u3001BeautifulSoup \u548c CSV \u5b58\u50a8\u6765\u6784\u5efa\u4e9a\u9a6c\u900a\u4ef7\u683c\u8ddf\u8e2a\u5668\u3002\u8be5\u811a\u672c\u5728\u4fdd\u5b58\u6570\u636e\u524d\u8fd8\u5e94\u68c0\u67e5\u9009\u62e9\u5668\u7f3a\u5931\u3001CAPTCHA \u9875\u9762\u4ee5\u53ca\u5730\u533a\u4ef7\u683c\u5dee\u5f02\u3002<\/p>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                                            <div class=\"section-faq__item\" data-accordion=\"wrapper\" data-accordion-group=\"faq\" role=\"listitem\">\n                            <h3 class=\"section-faq__heading\">\n                                <button class=\"section-faq__trigger\" data-accordion=\"trigger\" type=\"button\" aria-expanded=\"false\">\n                                    <span class=\"section-faq__question\">\u6293\u53d6 Amazon \u4ef7\u683c\u5408\u6cd5\u5417\uff1f<\/span>\n                                    <svg width=\"28\" height=\"28\" viewbox=\"0 0 28 28\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\">\n                                        <path d=\"M7 10.5L14 17.5L21 10.5\" stroke=\"#5D5D5D\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                                    <\/svg>\n                                <\/button>\n                            <\/h3>\n                            <div class=\"section-faq__content\">\n                                <div class=\"section-faq__answer\">\n                                    <p data-pm-slice=\"1 1 []\">\u8fd9\u53d6\u51b3\u4e8e\u4f60\u6536\u96c6\u4ec0\u4e48\u6570\u636e\u3001\u5982\u4f55\u6536\u96c6\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u6570\u636e\u3002\u8bf7\u67e5\u9605 Amazon \u7684 <a href=\"https:\/\/www.amazon.com\/gp\/help\/customer\/display.html?nodeId=508088\">\u4f7f\u7528\u6761\u4ef6<\/a>\uff0c\u8bf7\u8003\u8651\u4f7f\u7528 <a href=\"https:\/\/webservices.amazon.com\/paapi5\/documentation\/\">Product Advertising API<\/a> \u7528\u4e8e\u5df2\u83b7\u6279\u51c6\u7684\u4f7f\u7528\u573a\u666f\uff0c\u5e76\u9605\u8bfb\u4e00\u4efd\u66f4\u5168\u9762\u7684\u6307\u5357\uff0c\u4e86\u89e3 <a href=\"https:\/\/nodemaven.com\/zh\/blog\/is-web-scraping-legal\/\">\u7f51\u9875\u6293\u53d6\u662f\u5426\u5408\u6cd5<\/a>.<\/p>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                                            <div class=\"section-faq__item\" data-accordion=\"wrapper\" data-accordion-group=\"faq\" role=\"listitem\">\n                            <h3 class=\"section-faq__heading\">\n                                <button class=\"section-faq__trigger\" data-accordion=\"trigger\" type=\"button\" aria-expanded=\"false\">\n                                    <span class=\"section-faq__question\">\u4e3a\u4ec0\u4e48\u6211\u7684 Amazon \u6293\u53d6\u7a0b\u5e8f\u4f1a\u9047\u5230 CAPTCHA\uff1f<\/span>\n                                    <svg width=\"28\" height=\"28\" viewbox=\"0 0 28 28\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\">\n                                        <path d=\"M7 10.5L14 17.5L21 10.5\" stroke=\"#5D5D5D\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                                    <\/svg>\n                                <\/button>\n                            <\/h3>\n                            <div class=\"section-faq__content\">\n                                <div class=\"section-faq__answer\">\n                                    <p data-pm-slice=\"1 1 []\">\u5f53\u8bf7\u6c42\u6a21\u5f0f\u3001IP \u4fe1\u8a89\u3001\u8bf7\u6c42\u5934\u6216\u4f1a\u8bdd\u884c\u4e3a\u770b\u8d77\u6765\u53ef\u7591\u65f6\uff0cAmazon \u53ef\u80fd\u4f1a\u663e\u793a CAPTCHA\u3002\u8bf7\u653e\u6162\u8bf7\u6c42\u901f\u5ea6\u3001\u68c0\u67e5\u8fd4\u56de\u7684 HTML\u3001\u4f7f\u7528\u903c\u771f\u7684\u8bf7\u6c42\u5934\uff0c\u5982\u679c\u8ffd\u8e2a\u5668\u4ee5\u66f4\u9ad8\u7684\u91cf\u7ea7\u8fd0\u884c\uff0c\u53ef\u8003\u8651\u4f7f\u7528\u5e72\u51c0\u7684\u4f4f\u5b85\u4ee3\u7406\u3002<\/p>\n<h3>\u00a0<\/h3>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                                            <div class=\"section-faq__item\" data-accordion=\"wrapper\" data-accordion-group=\"faq\" role=\"listitem\">\n                            <h3 class=\"section-faq__heading\">\n                                <button class=\"section-faq__trigger\" data-accordion=\"trigger\" type=\"button\" aria-expanded=\"false\">\n                                    <span class=\"section-faq__question\">\u4e3a\u4ec0\u4e48\u6211\u7684\u722c\u866b\u4e2d\u663e\u793a\u7684 Amazon \u4ef7\u683c\u4e0d\u4e00\u6837\uff1f<\/span>\n                                    <svg width=\"28\" height=\"28\" viewbox=\"0 0 28 28\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\">\n                                        <path d=\"M7 10.5L14 17.5L21 10.5\" stroke=\"#5D5D5D\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                                    <\/svg>\n                                <\/button>\n                            <\/h3>\n                            <div class=\"section-faq__content\">\n                                <div class=\"section-faq__answer\">\n                                    <p data-pm-slice=\"1 1 []\">Amazon \u7684\u4ef7\u683c\u53ef\u80fd\u56e0\u5e02\u573a\u7ad9\u70b9\u3001ZIP \u90ae\u7f16\u3001\u914d\u9001\u5730\u70b9\u3001cookies\u3001\u767b\u5f55\u72b6\u6001\u3001\u4f18\u60e0\u5238\u4ee5\u53ca\u5356\u5bb6\u5e93\u5b58\u60c5\u51b5\u800c\u6709\u6240\u4e0d\u540c\u3002 <a href=\"https:\/\/nodemaven.com\/zh\/proxies\/residential-proxies\/\">\u4f4f\u5b85\u4ee3\u7406<\/a> \u5e2e\u52a9\u4f60\u901a\u8fc7 190 \u591a\u4e2a\u56fd\u5bb6\/\u5730\u533a\u7684 IP \u67e5\u770b\u672c\u5730\u4ef7\u683c\uff0c\u5e76\u63d0\u4f9b\u5730\u533a\u3001\u57ce\u5e02\u548c ZIP \u7ea7\u522b\u7684\u5b9a\u4f4d\u9009\u9879\u3002<\/p>\n<h3>\u00a0<\/h3>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                                            <div class=\"section-faq__item\" data-accordion=\"wrapper\" data-accordion-group=\"faq\" role=\"listitem\">\n                            <h3 class=\"section-faq__heading\">\n                                <button class=\"section-faq__trigger\" data-accordion=\"trigger\" type=\"button\" aria-expanded=\"false\">\n                                    <span class=\"section-faq__question\">\u6211\u5e94\u8be5\u4e3a Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668\u4f7f\u7528\u4ee3\u7406\u5417\uff1f<\/span>\n                                    <svg width=\"28\" height=\"28\" viewbox=\"0 0 28 28\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\">\n                                        <path d=\"M7 10.5L14 17.5L21 10.5\" stroke=\"#5D5D5D\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                                    <\/svg>\n                                <\/button>\n                            <\/h3>\n                            <div class=\"section-faq__content\">\n                                <div class=\"section-faq__answer\">\n                                    <p data-pm-slice=\"1 1 []\">\u5bf9\u4e8e\u5c0f\u89c4\u6a21\u7684\u624b\u52a8\u6d4b\u8bd5\uff0c\u4ee3\u7406\u53ef\u80fd\u5e76\u975e\u5fc5\u9700\u3002\u800c\u5bf9\u4e8e\u91cd\u590d\u68c0\u67e5\u3001\u533a\u57df\u6027\u4ef7\u683c\u8ffd\u8e2a\u6216\u66f4\u5927\u89c4\u6a21\u7684\u76d1\u63a7\uff0c\u4ee3\u7406\u6709\u52a9\u4e8e\u8ba9\u8bbf\u95ee\u4fdd\u6301\u66f4\u7a33\u5b9a\u3002\u5e26\u7c98\u6027\u4f1a\u8bdd\u7684\u4f4f\u5b85\u4ee3\u7406\u901a\u5e38\u662f Amazon \u4ef7\u683c\u76d1\u63a7\u7684\u6700\u4f73\u8d77\u70b9\u3002<\/p>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                                            <div class=\"section-faq__item\" data-accordion=\"wrapper\" data-accordion-group=\"faq\" role=\"listitem\">\n                            <h3 class=\"section-faq__heading\">\n                                <button class=\"section-faq__trigger\" data-accordion=\"trigger\" type=\"button\" aria-expanded=\"false\">\n                                    <span class=\"section-faq__question\">\u7528\u4e8e Amazon \u4ef7\u683c\u8ffd\u8e2a\u7684\u6700\u4f73\u4ee3\u7406\u7c7b\u578b\u662f\u4ec0\u4e48\uff1f<\/span>\n                                    <svg width=\"28\" height=\"28\" viewbox=\"0 0 28 28\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\">\n                                        <path d=\"M7 10.5L14 17.5L21 10.5\" stroke=\"#5D5D5D\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                                    <\/svg>\n                                <\/button>\n                            <\/h3>\n                            <div class=\"section-faq__content\">\n                                <div class=\"section-faq__answer\">\n                                    <p data-pm-slice=\"1 1 []\">\u4f4f\u5b85\u4ee3\u7406\u901a\u5e38\u6700\u9002\u5408\u7528\u4e8e Amazon \u4ef7\u683c\u8ddf\u8e2a\uff0c\u56e0\u4e3a\u5b83\u4eec\u4f7f\u7528\u771f\u5b9e\u7684\u6d88\u8d39\u8005\u7f51\u7edc IP\u3002\u7c98\u6027\u4f1a\u8bdd\u6709\u52a9\u4e8e\u5728\u76f8\u5173\u8bf7\u6c42\u671f\u95f4\u4fdd\u6301\u540c\u4e00\u4e2a IP\uff0c\u800c ZIP \u90ae\u7f16\u7ea7\u522b\u7684\u5b9a\u4f4d\u5219\u5728\u4ef7\u683c\u548c\u914d\u9001\u9009\u9879\u53d6\u51b3\u4e8e\u4e70\u5bb6\u6240\u5728\u5730\u65f6\u5f88\u6709\u5e2e\u52a9\u3002<\/p>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                                            <div class=\"section-faq__item\" data-accordion=\"wrapper\" data-accordion-group=\"faq\" role=\"listitem\">\n                            <h3 class=\"section-faq__heading\">\n                                <button class=\"section-faq__trigger\" data-accordion=\"trigger\" type=\"button\" aria-expanded=\"false\">\n                                    <span class=\"section-faq__question\">\u8fd9\u4e2a\u811a\u672c\u80fd\u8ffd\u8e2a\u591a\u4e2a Amazon \u4ea7\u54c1\u5417\uff1f<\/span>\n                                    <svg width=\"28\" height=\"28\" viewbox=\"0 0 28 28\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" aria-hidden=\"true\" focusable=\"false\">\n                                        <path d=\"M7 10.5L14 17.5L21 10.5\" stroke=\"#5D5D5D\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" \/>\n                                    <\/svg>\n                                <\/button>\n                            <\/h3>\n                            <div class=\"section-faq__content\">\n                                <div class=\"section-faq__answer\">\n                                    <p data-pm-slice=\"1 1 []\">\u53ef\u4ee5\u3002\u5c06\u66f4\u591a\u5546\u54c1 URL \u6dfb\u52a0\u5230 <code>PRODUCT_URLS<\/code> \u5217\u8868\u3002\u5148\u4ece\u4e00\u4e2a\u8f83\u5c0f\u7684\u5217\u8868\u5f00\u59cb\uff0c\u786e\u8ba4 CSV \u8f93\u51fa\u6b63\u786e\u65e0\u8bef\uff0c\u7136\u540e\u518d\u6162\u6162\u589e\u52a0\u4ea7\u54c1\u7684\u6570\u91cf\u3002<\/p>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                                    <\/div>\n                    <\/div>\n    <\/div>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"\u7528 Python \u642d\u5efa Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668\uff1a\u6293\u53d6\u4ef7\u683c\u3001\u4fdd\u5b58\u5386\u53f2\u3001\u6dfb\u52a0\u63d0\u9192\u3001\u5e94\u5bf9 Amazon \u5c01\u9501\uff0c\u5e76\u7528\u4ee3\u7406\u5b9e\u73b0\u7a33\u5b9a\u8ffd\u8e2a\u3002","protected":false},"author":68,"featured_media":39835,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[213,205],"class_list":["post-39826","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guides-tutorials","tag-web-scraping"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.1 (Yoast SEO v28.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Build an Amazon Price Tracker With Python | NodeMaven<\/title>\n<meta name=\"description\" content=\"Build an Amazon price tracker with Python. Scrape prices, save history, add alerts, handle Amazon blocks, and use proxies for reliable tracking\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nodemaven.com\/zh\/blog\/amazon-price-tracker-python\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Build an Amazon Price Tracker With Python\" \/>\n<meta property=\"og:description\" content=\"Build an Amazon price tracker with Python. Scrape prices, save history, add alerts, handle Amazon blocks, and use proxies for reliable tracking\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nodemaven.com\/zh\/blog\/amazon-price-tracker-python\/\" \/>\n<meta property=\"og:site_name\" content=\"NodeMaven\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/NodeMaven\/100095402507825\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-24T11:54:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-24T12:00:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/amazon-price-tracking.png\" \/>\n\t<meta property=\"og:image:width\" content=\"870\" \/>\n\t<meta property=\"og:image:height\" content=\"490\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Anna\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anna\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/\"},\"author\":{\"name\":\"Anna\",\"@id\":\"https:\\\/\\\/nodemaven.com\\\/#\\\/schema\\\/person\\\/f3bc93327b3582e735259d2a98f7a7ff\"},\"headline\":\"How to Build an Amazon Price Tracker With Python\",\"datePublished\":\"2026-07-24T11:54:28+00:00\",\"dateModified\":\"2026-07-24T12:00:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/\"},\"wordCount\":2110,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/nodemaven.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/amazon-price-tracking.png\",\"keywords\":[\"Guides &amp; Tutorials\",\"Web Scraping\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#respond\"]}],\"copyrightYear\":\"2026\",\"copyrightHolder\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/zh\\\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/\",\"url\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/\",\"name\":\"How to Build an Amazon Price Tracker With Python | NodeMaven\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/nodemaven.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/amazon-price-tracking.png\",\"datePublished\":\"2026-07-24T11:54:28+00:00\",\"dateModified\":\"2026-07-24T12:00:30+00:00\",\"description\":\"Build an Amazon price tracker with Python. Scrape prices, save history, add alerts, handle Amazon blocks, and use proxies for reliable tracking\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#primaryimage\",\"url\":\"https:\\\/\\\/nodemaven.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/amazon-price-tracking.png\",\"contentUrl\":\"https:\\\/\\\/nodemaven.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/amazon-price-tracking.png\",\"width\":870,\"height\":490,\"caption\":\"Amazon Price Tracker Tutorial | NodeMaven\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nodemaven.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Build an Amazon Price Tracker With Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nodemaven.com\\\/#website\",\"url\":\"https:\\\/\\\/nodemaven.com\\\/\",\"name\":\"NodeMaven\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nodemaven.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-CN\"},{\"@type\":[\"Organization\",\"Place\"],\"@id\":\"https:\\\/\\\/nodemaven.com\\\/#organization\",\"name\":\"NodeMaven\",\"url\":\"https:\\\/\\\/nodemaven.com\\\/\",\"logo\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#local-main-organization-logo\"},\"image\":{\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#local-main-organization-logo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/people\\\/NodeMaven\\\/100095402507825\\\/\",\"https:\\\/\\\/t.me\\\/NodeMavenTG\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/nodemaven\\\/\"],\"telephone\":[],\"openingHoursSpecification\":[{\"@type\":\"OpeningHoursSpecification\",\"dayOfWeek\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\",\"Sunday\"],\"opens\":\"00:00\",\"closes\":\"23:59\"}],\"legalName\":\"NodeMaven FZ LLC\",\"email\":\"support@nodemaven.com\",\"description\":\"NodeMaven is a proxy infrastructure provider offering residential, mobile, and ISP proxies with IP quality filtering, precise geo-targeting, HTTPS and SOCKS5 support, and developer APIs.\",\"contactPoint\":[{\"@type\":\"ContactPoint\",\"contactType\":\"customer support\",\"email\":\"support@nodemaven.com\"},{\"@type\":\"ContactPoint\",\"contactType\":\"legal\",\"email\":\"legal.public@nodemaven.com\"}],\"award\":[\"People Love Us, awarded by Trustpilot (2025)\",\"Top Rated, awarded by Top Business Software (2025)\",\"Customers Love Us, awarded by Sourceforge (2025)\",\"Users Love Us, awarded by G2 (2025)\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nodemaven.com\\\/#\\\/schema\\\/person\\\/f3bc93327b3582e735259d2a98f7a7ff\",\"name\":\"Anna\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\\\/\\\/nodemaven.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/anna-radziuk_avatar-96x96.jpg\",\"url\":\"https:\\\/\\\/nodemaven.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/anna-radziuk_avatar-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/nodemaven.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/anna-radziuk_avatar-96x96.jpg\",\"caption\":\"Anna\"},\"description\":\"Anna is a content manager at NodeMaven, and she specialises in turning complex technical topics into clear, practical guides backed by industry research, hands-on testing, and popular use cases.\",\"url\":\"https:\\\/\\\/nodemaven.com\\\/zh\\\/author\\\/anna-radziuk\\\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\\\/\\\/nodemaven.com\\\/blog\\\/amazon-price-tracker-python\\\/#local-main-organization-logo\",\"url\":\"https:\\\/\\\/nodemaven.com\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/cropped-Untitled-design-8-1.png\",\"contentUrl\":\"https:\\\/\\\/nodemaven.com\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/cropped-Untitled-design-8-1.png\",\"width\":512,\"height\":512,\"caption\":\"NodeMaven\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u7528 Python \u6784\u5efa Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668 | NodeMaven","description":"\u7528 Python \u642d\u5efa Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668\uff1a\u6293\u53d6\u4ef7\u683c\u3001\u4fdd\u5b58\u5386\u53f2\u3001\u6dfb\u52a0\u63d0\u9192\u3001\u5e94\u5bf9 Amazon \u5c01\u9501\uff0c\u5e76\u7528\u4ee3\u7406\u5b9e\u73b0\u7a33\u5b9a\u8ffd\u8e2a\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nodemaven.com\/zh\/blog\/amazon-price-tracker-python\/","og_locale":"zh_CN","og_type":"article","og_title":"How to Build an Amazon Price Tracker With Python","og_description":"Build an Amazon price tracker with Python. Scrape prices, save history, add alerts, handle Amazon blocks, and use proxies for reliable tracking","og_url":"https:\/\/nodemaven.com\/zh\/blog\/amazon-price-tracker-python\/","og_site_name":"NodeMaven","article_publisher":"https:\/\/www.facebook.com\/people\/NodeMaven\/100095402507825\/","article_published_time":"2026-07-24T11:54:28+00:00","article_modified_time":"2026-07-24T12:00:30+00:00","og_image":[{"width":870,"height":490,"url":"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/amazon-price-tracking.png","type":"image\/png"}],"author":"Anna","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Anna","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#article","isPartOf":{"@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/"},"author":{"name":"Anna","@id":"https:\/\/nodemaven.com\/#\/schema\/person\/f3bc93327b3582e735259d2a98f7a7ff"},"headline":"How to Build an Amazon Price Tracker With Python","datePublished":"2026-07-24T11:54:28+00:00","dateModified":"2026-07-24T12:00:30+00:00","mainEntityOfPage":{"@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/"},"wordCount":2110,"commentCount":0,"publisher":{"@id":"https:\/\/nodemaven.com\/#organization"},"image":{"@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#primaryimage"},"thumbnailUrl":"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/amazon-price-tracking.png","keywords":["Guides &amp; Tutorials","Web Scraping"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#respond"]}],"copyrightYear":"2026","copyrightHolder":{"@id":"https:\/\/nodemaven.com\/zh\/#organization"}},{"@type":"WebPage","@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/","url":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/","name":"\u5982\u4f55\u7528 Python \u6784\u5efa Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668 | NodeMaven","isPartOf":{"@id":"https:\/\/nodemaven.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#primaryimage"},"image":{"@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#primaryimage"},"thumbnailUrl":"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/amazon-price-tracking.png","datePublished":"2026-07-24T11:54:28+00:00","dateModified":"2026-07-24T12:00:30+00:00","description":"\u7528 Python \u642d\u5efa Amazon \u4ef7\u683c\u8ffd\u8e2a\u5668\uff1a\u6293\u53d6\u4ef7\u683c\u3001\u4fdd\u5b58\u5386\u53f2\u3001\u6dfb\u52a0\u63d0\u9192\u3001\u5e94\u5bf9 Amazon \u5c01\u9501\uff0c\u5e76\u7528\u4ee3\u7406\u5b9e\u73b0\u7a33\u5b9a\u8ffd\u8e2a\u3002","breadcrumb":{"@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/"]}]},{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#primaryimage","url":"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/amazon-price-tracking.png","contentUrl":"https:\/\/nodemaven.com\/wp-content\/uploads\/2026\/07\/amazon-price-tracking.png","width":870,"height":490,"caption":"Amazon Price Tracker Tutorial | NodeMaven"},{"@type":"BreadcrumbList","@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nodemaven.com\/"},{"@type":"ListItem","position":2,"name":"How to Build an Amazon Price Tracker With Python"}]},{"@type":"WebSite","@id":"https:\/\/nodemaven.com\/#website","url":"https:\/\/nodemaven.com\/","name":"NodeMaven","description":"","publisher":{"@id":"https:\/\/nodemaven.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nodemaven.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-CN"},{"@type":["Organization","Place"],"@id":"https:\/\/nodemaven.com\/#organization","name":"NodeMaven","url":"https:\/\/nodemaven.com\/","logo":{"@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#local-main-organization-logo"},"image":{"@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#local-main-organization-logo"},"sameAs":["https:\/\/www.facebook.com\/people\/NodeMaven\/100095402507825\/","https:\/\/t.me\/NodeMavenTG","https:\/\/www.linkedin.com\/company\/nodemaven\/"],"telephone":[],"openingHoursSpecification":[{"@type":"OpeningHoursSpecification","dayOfWeek":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"opens":"00:00","closes":"23:59"}],"legalName":"NodeMaven FZ LLC","email":"support@nodemaven.com","description":"NodeMaven \u662f\u4e00\u5bb6\u4ee3\u7406\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u5546\uff0c\u63d0\u4f9b\u4f4f\u5b85\u3001\u79fb\u52a8\u548c ISP \u4ee3\u7406\uff0c\u5177\u5907 IP \u8d28\u91cf\u7b5b\u9009\u3001\u7cbe\u51c6\u5730\u7406\u5b9a\u5411\u3001HTTPS \u548c SOCKS5 \u652f\u6301\uff0c\u4ee5\u53ca\u5f00\u53d1\u8005 API\u3002","contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@nodemaven.com"},{"@type":"ContactPoint","contactType":"legal","email":"legal.public@nodemaven.com"}],"award":["People Love Us, awarded by Trustpilot (2025)","Top Rated, awarded by Top Business Software (2025)","Customers Love Us, awarded by Sourceforge (2025)","Users Love Us, awarded by G2 (2025)"]},{"@type":"Person","@id":"https:\/\/nodemaven.com\/#\/schema\/person\/f3bc93327b3582e735259d2a98f7a7ff","name":"\u5b89\u5a1c","image":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/nodemaven.com\/wp-content\/uploads\/2025\/05\/anna-radziuk_avatar-96x96.jpg","url":"https:\/\/nodemaven.com\/wp-content\/uploads\/2025\/05\/anna-radziuk_avatar-96x96.jpg","contentUrl":"https:\/\/nodemaven.com\/wp-content\/uploads\/2025\/05\/anna-radziuk_avatar-96x96.jpg","caption":"Anna"},"description":"Anna \u662f NodeMaven \u7684\u5185\u5bb9\u7ecf\u7406\uff0c\u5979\u64c5\u957f\u5c06\u590d\u6742\u7684\u6280\u672f\u4e3b\u9898\u8f6c\u5316\u4e3a\u6e05\u6670\u3001\u5b9e\u7528\u7684\u6307\u5357\uff0c\u5e76\u4ee5\u884c\u4e1a\u7814\u7a76\u3001\u5b9e\u64cd\u6d4b\u8bd5\u548c\u70ed\u95e8\u4f7f\u7528\u573a\u666f\u4e3a\u4f9d\u636e\u3002","url":"https:\/\/nodemaven.com\/zh\/author\/anna-radziuk\/"},{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/nodemaven.com\/blog\/amazon-price-tracker-python\/#local-main-organization-logo","url":"https:\/\/nodemaven.com\/wp-content\/uploads\/2025\/03\/cropped-Untitled-design-8-1.png","contentUrl":"https:\/\/nodemaven.com\/wp-content\/uploads\/2025\/03\/cropped-Untitled-design-8-1.png","width":512,"height":512,"caption":"NodeMaven"}]}},"_links":{"self":[{"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/posts\/39826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/comments?post=39826"}],"version-history":[{"count":8,"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/posts\/39826\/revisions"}],"predecessor-version":[{"id":39843,"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/posts\/39826\/revisions\/39843"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/media\/39835"}],"wp:attachment":[{"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/media?parent=39826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/categories?post=39826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nodemaven.com\/zh\/wp-json\/wp\/v2\/tags?post=39826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}