Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1000 Bytes

README.md

File metadata and controls

39 lines (25 loc) · 1000 Bytes

淘宝、天猫商品爬虫

Latest Stable Version Total Downloads License

配置淘宝商品ID,通过Web版和H5版本的HTML、API数据结合,抓取淘宝、天猫商品的数据

Requirement

Installation

composer require "shjia/taobao_spider:~1.0"

Usage

<?php
require_once 'src/spider.php';

use Ezspider\spider;

$importModel = new \Ezspider\spider;

$importModel->setItemId('569643840385');
if(empty($importModel->initGoodsPlatform())){
    return;
}

$params['name'] = $importModel->getGoodsTitle();
$params['image'] = $importModel->getPreviewImg();
$params['detail'] = $importModel->getDetails();


print_r($params);