Python刮擦动态表

发布于 2025-01-29 08:56:58 字数 274 浏览 2 评论 0 原文

我尝试了几次不同的尝试来刮擦以下页面:

某种程度上,我在请求或硒方法方面没有成功。

那些人有一个想法如何刮擦历史数据表的数据?

感谢您的提示。

Thinkerbell

I tried with several different attempts to scrape the following page:
https://www.finanzen.ch/rohstoffe/historisch/weizenpreis/euro/17.4.2022_17.5.2022

Somehow, I'm not successful with request or selenium approach.

Those anybody has an idea how to scrape the data of the historical data table?

Thanks for your hints.

ThinkerBell

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

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

发布评论

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

评论(1

冰魂雪魄 2025-02-05 08:56:58

您无法使用简单的请求绕过此网站。GET,Selenium/Splash,甚至旋转式Proxies都不会始终工作。这是因为,该网站使用“ Captcha Services”,并且知道您如何尝试访问页面。标题包含“ content-disposition:form-data; name ='recaptcha-token';”;有一个长的密码/编码术语,并且由于该术语是基于您的浏览活动,因此将其复制在标题中也无法正常工作。

对于这种棘手的网站,最佳选择是使用基于浏览器的附加组件,例如“ imacro ”。如果您开始浏览主页并加载更多的虚拟链接,则可以通过硒增加机会,然后再达到目标链接。

You can't bypass this website using simple requests.get, selenium/splash and even rotating-proxies won't work always. This is because, this website uses "Captcha services" and it knows how you are trying to access the page. The headers contains "Content-Disposition: form-data; name='recaptcha-token';" with a long cipher/encoded term, and since this term is based on your browsing activities, copy-pasting it in headers won't work either.

For such tricky websites, best option is to use browser based add-ons like "iMacro". You may also increase chances through Selenium, if you start browsing homepage and loading few more dummy links, before reaching the targeted link.

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