Comments (2)
案例一 中符合采集规则的数据只有一条,所以采集结果只有一条,案例二符合采集规则的数据有多条,所以采集结果有多条;案例一中Array[0]中虽然有多条数据,但他们是一个整体,合起来是一条数据。
from querylist.
@jae-jae 很高兴能收到你的回信,感谢你对我提问的回答。只是读完回答后,我还是有点不明白。在案例一中,我写了三条采集规则,分别为'text','link'和'img',并且这三条采集规则都能采集到对应数据,为何你的回答中说,符合采集规则的数据只有一条?以下我将附上采集规则,期待你的下一次回复。
$rules = array(
//采集id为one这个元素里面的纯文本内容
'text' => array('#one','text'),
//采集class为two下面的超链接的链接
'link' => array('.two>a','href'),
//采集class为two下面的第二张图片的链接
'img' => array('.two>img:eq(1)','src'),
//采集span标签中的HTML内容
'other' => array('span','html')
);
from querylist.
Related Issues (20)
- 设置的代理需要验证账号密码如何填写? HOT 1
- 请支持Laravel 9 谢谢 HOT 7
- 我想去掉hidden的属性怎么写? HOT 1
- php8.0 laravel 8.5 无法安装 HOT 3
- [已解决]开发环境下 依赖不兼容PHP7.4语法 HOT 1
- 可以修改富文本当中的部分内容吗? HOT 1
- 切片后数据为空
- Add support laravel 9 HOT 5
- 啥时候能支持laravel9 HOT 1
- Fatal error: Uncaught TypeError: Argument 1 passed to QL\Services\MultiRequestService::QL\Services\{closure}() must be an instance of GuzzleHttp\Exception\RequestException, instance of GuzzleHttp\Exception\ConnectException given HOT 3
- 希望支持一下laravel9&&php8+ HOT 4
- 期望实现devtools-protocol,就能和puppeteer一样愉快的使用了 HOT 1
- 依赖库 pguardiario/phpuri 已被删除
- PHP7.4环境代码执行结果与预期不一致! HOT 3
- 使用【Baidu 插件】返回 百度安全验证 网络不给力,请稍后重试 返回首页 问题反馈 HOT 1
- 希望支持php8.0/laravel 9 HOT 2
- The domain querylist.cc is expired,please fix it
- 什么时候支持php8啊,已经在用8.2了,马上都出8.3了 HOT 4
- php8.1 fixes - Cannot push my branch
- QueryList4.2.8列表采集,不能正常执行 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from querylist.