https://github.com/ecmadao/hands-chopping
[UNMAINTAINED] Use python to get goods info from some shopping website
https://github.com/ecmadao/hands-chopping
Last synced: 9 months ago
JSON representation
[UNMAINTAINED] Use python to get goods info from some shopping website
- Host: GitHub
- URL: https://github.com/ecmadao/hands-chopping
- Owner: ecmadao
- License: mit
- Created: 2016-06-28T09:30:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-12T04:03:32.000Z (over 3 years ago)
- Last Synced: 2025-04-11T00:12:11.353Z (9 months ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/hands_chopping
- Size: 446 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## [Hands-Chopping](https://pypi.python.org/pypi/hands_chopping) 剁手党
[](https://travis-ci.org/ecmadao/Hands-Chopping)
作为剁手党,必须得有个方便的工具来愉快的剁手~
### Rely
python 3.5+
[click](http://click.pocoo.org/6)
[prettytable](https://pypi.python.org/pypi/PrettyTable)
[bs4](https://pypi.python.org/pypi/beautifulsoup4)
[selenium](www.seleniumhq.org/)
### Install
**通过pip3**
```bash
$ sudo pip3 install hands_chopping
```
**或者本地安装**
```bash
$ git clone https://github.com/ecmadao/Hands-Chopping
$ cd Hands-Chopping-master
$ sudo python3 setup.py install
```
### Usage
```bash
$ goods
# example
$ goods —site=jd # 仅搜索京东
$ goods —site=tb # 仅搜索淘宝
```
**local usage**
不安装项目的情况下
```bash
# 下载项目文件,cd到项目根目录
$ python3 run.py
```
### Help
```python
"""
Usage:
$ goods [--site= all | jd | tb]
Options:
--site: 要搜索的网站,jd-京东,tb-淘宝,默认全部
Examples:
$ goods --site=jd
$ goods
"""
```

### Notes
- 目前支持淘宝/京东的搜索
- 输入goods会提示输入关键字,多个关键字之间使用空格分隔
- 搜索完成后可进入下一步操作,根据提示,输入商品编号。多个编号间使用`,`链接,则可打开浏览器窗口进入到商品详情页
### TODO
- [x] ~~测试得加上,目前CI一直爆。但仅仅因为没有测试,实际没有影响~~
- [ ] 商品排序(按照金额等)
- [ ] 现阶段只抓取了第一页的商品。之后考虑抓取多页
- [ ] more unittest
- [x] ~~use click instead of docopt~~
- [ ] 容错
- [ ] 没有数据
- [ ] 数据结构有变
- [ ] 更多配置
- [ ] 爬取速度
- [ ] 爬取页数