网络抓取 Groupon

发布于 2024-09-25 15:22:00 字数 168 浏览 0 评论 0原文

我现在想废掉 groupon.com 我的问题是这样的网站,当您第一次加载时,会要求您加入他们的电子邮件服务,但当您重新加载页面时,它们会直接向您显示页面的内容。我该怎么做?我正在使用 php 编写脚本。

另外,如果有人可以建议一个 php 中的框架或库,使抓取变得容易,那就太好了。

谢谢

i want scrap groupon.com now my problem is such sites when you load for the first time asks you to join their email service but when you reload the page they directly show you the content of the page. how do i do it? i am using php for my scripting.

also if anyone could suggest a framework or library in php which makes scraping easy it would be great.

thanks

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

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

发布评论

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

评论(3

冷弦 2024-10-02 15:22:00

我会调查 cURL 库 来抓取网站内容。我不确定您想要抓取的确切信息,或者刷新是否会导致问题,但希望这能启动您的尝试。

I would investigate the cURL library for grabbing website content. I'm not sure on the exact information you want to scrape, or if the refresh will cause an issue, but hopefully this launches your attempt.

债姬 2024-10-02 15:22:00

您必须坚持使用 PHP 进行抓取吗? TestPlan 使此类测试变得简单。您可以再次访问该页面,或者只需使用 TestPlan 注册他们的电子邮件列表以获得对其网站的扩展访问权限。

这是一个粗略的示例,它将带您进入主页并关闭小弹出窗口:

GotoURL http://www.groupon.com/
Click id:step_one

SubmitForm with
    %Params:subscription[email_address]% [email protected]
end

Click id:close

Must you stick with PHP for the scraping? TestPlan makes this type of testing easy. You can either access the page again, or simply use TestPlan to sign up for their email list to gain extended access to their site.

Here's a rough example that takes you to the main page and closes the little popup:

GotoURL http://www.groupon.com/
Click id:step_one

SubmitForm with
    %Params:subscription[email_address]% [email protected]
end

Click id:close
吃颗糖壮壮胆 2024-10-02 15:22:00

他们有一个 API http://www.groupon.com/pages/api 如果有帮助的话。

They have an API http://www.groupon.com/pages/api if that helps.

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