刮擦文本呈现为SVG图形(以阻止刮刀) - 如何?

发布于 2025-01-20 15:04:06 字数 514 浏览 1 评论 0原文

因此,这次在我的刮擦逃生中,我遇到了一个新的敌人 - 一个网站,通过“转换”每个人都想刮入SVG图像的价格数据来阻止刮擦。一个简单的问题 - 刮擦此类站点的“首选”工具或方法是持续的?我想到使用Selenium下载完整的屏幕截图(带有隐形,因为该网站也具有Cloudflare scrape检测),并使用Tesseract下载OCR,但是单独下载大约需要7秒钟(我有180个scrape scrape)可以这么说,这不是完全不可行的,这是低于预期的。

我的问题是,我应该考虑解决这项任务的一般方法,技术或工具?有没有一种方法可以直接在网站上使用SVG,而不必以某种方式下载它们/制作屏幕截图?还是我应该看什么?

作为参考,我要刮擦的是 - 例如 - https://www.goatbots.com /set/kaldheim ,“买”和“卖”列

So this time in my scraping escapades I've encountered a new foe - a website which deters scrapers by "transforming" the price data everyone would like to scrape into SVG images. A simple question - what is the "preferred" tool or method of scraping such a site continously? I thought of downloading full page screenshots with Selenium (with stealth, since the site also has cloudflare scrape detection) and OCR'ing it with tesseract but downloading alone takes about 7 seconds per page (and I have 180 of them to scrape) so while that isn't completely unworkable, it is below expectations, so to speak.

My question is, what are the general methods, techniques or tools I should be looking at to tackle this task? Is there a way of OCR'ing the SVGs directly on the site without having to download them somehow/making screenshots? Or what should I be looking at?

for reference, what I'm trying to scrape is for example this - https://www.goatbots.com/set/kaldheim , the "buy" and "sell" columns

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独留℉清风醉 2025-01-27 15:04:06

您可以尝试仅截取价格元素的屏幕截图,而不是截取完整的页面屏幕截图。 这篇文章的部分屏幕截图

查看 使用 tesseract 进行 OCR 是最好的免费选择。

对于 cloudflare,使用 chrome 未检测到的 python 驱动程序,它非常成功地绕过了 cloudflare。

You could try taking the screenshots of the price elements only instead of taking complete page screenshot. Check this post for partial screenshots

As for OCR'ing it with tesseract is the best free option.

For cloudflare use chrome undetected driver for python which is very much successful in bypassing cloudflare.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文