Compare commits

..

4 Commits
master ... Dev

Author SHA1 Message Date
岛风
d20cd9b093 release 2.0 2019-09-10 20:49:20 +08:00
岛风
2a5c032013 fix some bugs 2019-09-10 00:56:27 +08:00
daofeng
48ea3536cf coding 2019-09-09 18:55:21 +08:00
岛风
c33ad58d34 coding rebuild 2019-09-08 22:41:58 +08:00
4 changed files with 6 additions and 7 deletions

BIN
DoubanSpider/douban.db Normal file

Binary file not shown.

View File

@ -4,5 +4,5 @@ idna==2.8
requests==2.22.0
SQLAlchemy==1.3.8
sqlit==0.1.6
urllib3==1.25.8
urllib3==1.25.3
wincertstore==0.2

View File

@ -4,14 +4,14 @@
```shell
git clone https://github.com/nyaasuki/DoubanBookSpider.git
cd ./DoubanBookSpider
python3 main.py
python3 Spider.py
```
## Window
配置好环境后
下载并解压https://github.com/nyaasuki/DoubanBookSpider/archive/master.zip
使用cmd命令运行
```DOS
python path\DoubanBookSpider\main.py #path为文件存放路径
python path\DoubanBookSpider\Spider.py #path为文件存放路径
```
或者
@ -22,5 +22,4 @@ __将已经写好的脚本文件拖拽到当前光标位置然后敲回车运
# 重置程序
删除DoubanBookSpider目录下的douban.db即可
删除DoubanBookSpider目录下的Spider.db即可

View File

@ -19,6 +19,7 @@ class SpiderMain(Cmd):
print('[Help] tag all - 爬取所有标签下的书籍')
print('[Help] quit - 退出程序')
def do_start(self, arg):
for row in url_pool():
douban.get_data(row)
@ -42,8 +43,7 @@ class SpiderMain(Cmd):
def url_pool():
m = douban.session.query(Douban.url, Douban.tag).all()
if not m:
if not n:
print('[Spider]你需要先获取tag数据!')
else:
for row in douban.session.query(Douban.url, Douban.tag, Douban.id).all():