You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
442 B
11 lines
442 B
from config.log import writeInfo, writeError
|
|
from main import MeiTuanCrawler, MysqlDB
|
|
|
|
c = MeiTuanCrawler()
|
|
c.getCity()
|
|
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]()
|
|
|