fix a bug

This commit is contained in:
岛风 2019-09-13 01:32:36 +08:00
parent 02b393ae94
commit cb324261e9
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

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