This commit is contained in:
Alone
2024-09-14 15:10:43 +08:00
parent 6c64bbd82a
commit 610dee88cd
4241 changed files with 0 additions and 622695 deletions
-36
View File
@@ -1,36 +0,0 @@
# phpQuery-single
phpQuery onefile composer.Continuous maintenance,Welcome PR.
`QueryList` base on phpQuery: https://github.com/jae-jae/QueryList
phpQuery单文件版本,持续维护,欢迎PR.
> phpQuery项目主页:http://code.google.com/p/phpquery/
`QueryList`是基于phpQuery的采集工具: https://github.com/jae-jae/QueryList
## Composer Installation
Packagist: https://packagist.org/packages/jaeger/phpquery-single
```
composer require jaeger/phpquery-single
```
## Usage
```php
$html = <<<STR
<div id="one">
<div class="two">
<a href="http://querylist.cc">QueryList官网</a>
<img src="http://querylist.cc/1.jpg" alt="这是图片">
<img src="http://querylist.cc/2.jpg" alt="这是图片2">
</div>
<span>其它的<b>一些</b>文本</span>
</div>
STR;
$doc = phpQuery::newDocumentHTML($html);
$src = $doc->find('.two img:eq(0)')->attr('src');
echo $src;
// http://querylist.cc/1.jpg
```
-24
View File
@@ -1,24 +0,0 @@
{
"name": "jaeger/phpquery-single",
"description": "phpQuery单文件版本,是Querylist的依赖(http://querylist.cc/)phpQuery项目主页:http://code.google.com/p/phpquery/",
"homepage": "http://code.google.com/p/phpquery/",
"license": "MIT",
"require": {
"PHP":">=5.3.0"
},
"authors": [
{
"name": "Tobiasz Cudnik"
,"email": "tobiasz.cudnik@gmail.com"
,"homepage": "https://github.com/TobiaszCudnik"
,"role": "Developer"
}
,{
"name": "Jaeger",
"role": "Packager"
}
],
"autoload":{
"classmap":["phpQuery.php"]
}
}
File diff suppressed because it is too large Load Diff