parent
ebe2382d4a
commit
ae0f735438
@ -1,5 +1,11 @@ |
|||||||
|
from config.log import writeInfo, writeError |
||||||
from main import MeiTuanCrawler, MysqlDB |
from main import MeiTuanCrawler, MysqlDB |
||||||
|
|
||||||
c = MeiTuanCrawler() |
c = MeiTuanCrawler() |
||||||
c.getCity() |
c.getCity() |
||||||
c.meishi() |
option=input('选择爬虫选项:\n1.爬取所有城市\n2.爬取指定城市\n') |
||||||
|
methods={'1':c.meishi,'2':c.meishiInputCity} |
||||||
|
while option not in methods: |
||||||
|
writeError('选项{}不合法!!!'.format(option)) |
||||||
|
option = input('选择爬虫选项:\n1.爬取所有城市\n2.爬取指定城市\n') |
||||||
|
methods[option]() |
||||||
|
Loading…
Reference in new issue