https://github.com/jayin/goods-crawling
爬取amazon/bestbuy/costco/6pm 的商品详情
https://github.com/jayin/goods-crawling
amazon crawler node
Last synced: over 1 year ago
JSON representation
爬取amazon/bestbuy/costco/6pm 的商品详情
- Host: GitHub
- URL: https://github.com/jayin/goods-crawling
- Owner: Jayin
- Created: 2016-08-30T14:06:57.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-02-13T06:48:17.000Z (over 9 years ago)
- Last Synced: 2025-02-27T03:11:22.217Z (over 1 year ago)
- Topics: amazon, crawler, node
- Language: JavaScript
- Homepage:
- Size: 170 KB
- Stars: 10
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## goods-crawling [](https://www.npmjs.com/package/goods-crawling)
> 爬取amazon/bestbuy/costco/6pm 的商品详情
### Setup
```
$ npm install
```
### Test
- amazon.com
```
$ node ./test/amazon.js
```
- bestbuy.com
```
$ node ./test/bestbuy.js
```
- 6pm.com
```
$ node ./test/sixpm.js
```
- costco.com
```
$ node ./test/costco.js
```
- function testing
```
$ node ./test/test.js
```
### Usage
```js
const {fetchGoodsData} = require('goods-crawling');
let url = 'https://www.amazon.com/Nike-Rosherun-Black-Anthracite-Running/dp/B00BOR6I68/ref=sr_1_2?ie=UTF8&qid=1472541714&sr=8-2&keywords=nike';
fetchGoodsData(url, {}, function(err, data){
if(err){
console.err("Error:" + err)
return
}
console.log(data)
});
```