jae-jae / QueryList

:spider: The progressive PHP crawler framework! 优雅的渐进式PHP采集框架。
https://querylist.cc
2.66k stars 441 forks source link

我想获取整个hmtl文档的text文本,但是这里面有script标签的内容,我想排除掉script里的文本,怎么写 #149

Closed hubo123 closed 5 months ago

hubo123 commented 3 years ago

我想获取整个hmtl文档的text文本,但是这里面有script标签的内容,我想排除掉script里的文本,怎么写

jae-jae commented 2 years ago
$rules = [
  "context" => [".ele", "text", "-script"]
];

过滤用法文档:https://querylist.cc/docs/api/v4/rules