Download the PHP package lapuad/taobao-tmall_spider without Composer
On this page you can find all versions of the php package lapuad/taobao-tmall_spider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lapuad/taobao-tmall_spider
More information about lapuad/taobao-tmall_spider
Files in lapuad/taobao-tmall_spider
Package taobao-tmall_spider
Short Description 淘宝、天猫商品详情数据抓取PHP版本,目前支持PC端淘宝网和天猫网站商品详情页数据抓取,后续会考虑添加天猫超市、天猫国际以及Python版本的支持。It's a php spider for crawling goods data from taobao.com and tmall.com. A python3 version spider will also be available later.
License MIT
Informations about the package taobao-tmall_spider
taobao-tmall_spider_php
简介:淘宝、天猫商品详情数据抓取PHP版本,目前支持PC端淘宝网和天猫网站商品详情页数据抓取, 后续会考虑添加天猫超市、天猫国际以及Python版本的支持。
安装:
composer require lapuad/taobao-tmall_spider
使用示例:
use Spider\Taobao\TaobaoSpider;
$info = TaobaoSpider::importGoods($url);
print_r($info);
返回结果:
Array ( [code] => 200 [msg] => 获取成功! [data] => Array ( [title] => 雅诗兰黛护肤套装 小棕瓶眼霜+小棕瓶精华 补水保湿修护 [images] => Array ( [0] => https://img.alicdn.com/imgextra/i4/2064892827/O1CN01d2TuSJ1WkoAjeoiYn_!!0-item_pic.jpg [1] => https://img.alicdn.com/imgextra/i4/2064892827/O1CN01xIAfe71WkoAjjk35u-2064892827.jpg [2] => https://img.alicdn.com/imgextra/i2/2064892827/O1CN01DlzAt11WkoAUwoQf4_!!2064892827.jpg [3] => https://img.alicdn.com/imgextra/i2/2064892827/O1CN011Wko84caiqRG8Lj_!!2064892827.jpg [4] => https://img.alicdn.com/imgextra/i4/2064892827/O1CN01Neups11WkoAeNMA6H_!!2064892827.jpg ) [desc] => '商品详情html' ) )
返回字段说明:
code,状态,200表示抓取成功;
msg,信息,抓取失败会提示信息;
data,数据:title=商品标题,images=商品图片,desc=商品详情HTML