Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  更新readme,使用composer
  • Loading branch information
shjia committed Jun 11, 2018
2 parents 6a78cc6 + 5cd99a2 commit cd63067
Show file tree
Hide file tree
Showing 139 changed files with 51 additions and 14,404 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.DS_Store
/vendor
/.idea
/composer.lock
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
#淘宝、天猫商品爬虫
# 淘宝、天猫商品爬虫

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

##用法
## Requirement

/usr/local/php/bin/php index.php
## Installation

## Usage

```php
<?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);

```
20 changes: 20 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "shjia/taobao_spider",
"description": "淘宝、天猫商品爬虫",
"type": "project",
"keywords": [
"taobao-spider",
"tmall-spider"
],
"license": "MIT",
"authors": [
{
"name": "chimu",
"email": "chimu@gbokee.com"
}
],
"require": {
"php": ">=5.5.25",
"aliyuncs/oss-sdk-php": "^2.2"
}
}
2 changes: 1 addition & 1 deletion src/autoload.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
require_once dirname(__DIR__) . '/vendor/aliyuncs/oss-sdk-php/autoload.php';
require_once dirname(__DIR__) . '/vendor/autoload.php';

function ezLoader($class)
{
Expand Down
2 changes: 0 additions & 2 deletions vendor/aliyuncs/oss-sdk-php/.coveralls.yml

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/aliyuncs/oss-sdk-php/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions vendor/aliyuncs/oss-sdk-php/.travis.yml

This file was deleted.

82 changes: 0 additions & 82 deletions vendor/aliyuncs/oss-sdk-php/CHANGELOG.md

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/aliyuncs/oss-sdk-php/LICENSE.md

This file was deleted.

152 changes: 0 additions & 152 deletions vendor/aliyuncs/oss-sdk-php/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions vendor/aliyuncs/oss-sdk-php/autoload.php

This file was deleted.

13 changes: 0 additions & 13 deletions vendor/aliyuncs/oss-sdk-php/build-phar.sh

This file was deleted.

Loading

0 comments on commit cd63067

Please sign in to comment.