如何屏幕抓取网站和获取数据在div? [英] How do I screen scrape a website and get data within div?

查看:454
本文介绍了如何屏幕抓取网站和获取数据在div?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用cURL屏幕抓取网站并显示特定div中的数据?

How can I screen scrape a website using cURL and show the data within a specific div?

推荐答案

cURL(文档中有很多示例) 。然后使用DOM解析器,例如简单HTML DOM 或PHPs DOM 从div元素中提取值。

Download the page using cURL (There are a lot of examples in the documentation). Then use a DOM Parser, for example Simple HTML DOM or PHPs DOM to extract the value from the div element.

这篇关于如何屏幕抓取网站和获取数据在div?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆