刮擦动态加载的网站,而无需更改地址Python/Selenium

发布于 2025-02-10 07:13:06 字数 558 浏览 2 评论 0原文

如何从A&LT刮擦清单; ul>标签如果在原始网站上单击后仅在DIV中加载列表?

我尝试使用硒来自动点击自动化,但是由于它不会更改网站的HTTPS地址,所以我不确定如何获取此加载的数据,否则返回&lt< ul>< /ul>有美丽的汤。最终目标是在400&lt左右获取所有数据。 li>该动态加载列表内部的标签,在单击按钮后,在检查工具中才能看到该标签。

该网站是: https://wwww.ibiscycles.com/test-ride/ Find-a-Dealer

手动单击搜索按钮后,所有适用位置的列表均在此下加载。 div>名称:此屏幕截图显示了使用Inspect

预先感谢您!

How would one go about scraping a list from a < ul> tag if the list is only loaded in the div after a click is given on the original website?

I have tried using Selenium to automate the click, but because it doesn't change the https address of the website I am unsure how to get at this loaded-in data that otherwise returns < ul>< /ul> with Beautiful soup. The end goal is to get all of the data inside around 400 < li> tags inside of this dynamically loaded list, which is not seen in the inspect tool until after a button is clicked.

The website is: https://www.ibiscycles.com/test-ride/find-a-dealer

After manually clicking the search button the list of all applicable locations is loaded under this < div> name: This screenshot shows the breakdown using inspect

Thank you in advance!

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

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

发布评论

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

评论(1

挥剑断情 2025-02-17 07:13:06

为什么不能单击按钮?等待UL在选择之前可单击。单击将其加载到中的按钮后,这应该使您可以抓住UL

Why can't you click the button? Wait for the ul to be clickable before selecting it. This should allow you to grab the ul after you've clicked on the button that loads it in

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