master
wkyuu 3 years ago
parent 0c97d9f58e
commit 3e41a90ac6

@ -348,6 +348,11 @@ redisconn = redis.Redis(host = '127.0.0.1', port = '6379', password = 'x', db =
在使用线程池的情况下,完整跑完 1500条数据用时544秒 在使用线程池的情况下,完整跑完 1500条数据用时544秒
- 目前已知问题
- 在非windows环境下打开可视化界面时会找不到字体解决方法是修改 settings.py 中的字体为自己当前操作系统所有的字体。使用view.py中的getFont方法能列出当前系统所有的字体。
## 参考链接 ## 参考链接
1[selenium+python自动化100-centos上搭建selenium启动chrome浏览器headless无界面模式](https://www.cnblogs.com/yoyoketang/p/11582012.html) 1[selenium+python自动化100-centos上搭建selenium启动chrome浏览器headless无界面模式](https://www.cnblogs.com/yoyoketang/p/11582012.html)

@ -76,11 +76,14 @@ class view:
def listCatalogues(): def listCatalogues():
path = r"./Catalogues/" path = r"./Catalogues/"
if not os.path.exists(path):
print("当前目录[{}]下没有数据!".format(path))
return False, None, None
dirList = os.listdir(path) dirList = os.listdir(path)
fileList = [] fileList = []
for filename in dirList: for filename in dirList:
fileList.append(path + filename) fileList.append(path + filename)
return len(fileList), fileList return True, len(fileList), fileList
def getData(filename, catalogue): def getData(filename, catalogue):
while True: while True:
@ -145,8 +148,8 @@ def getData(filename, catalogue):
else: print("无效选项!") else: print("无效选项!")
def main(): def main():
length, fileList = listCatalogues() check, length, fileList = listCatalogues()
while True: while check:
print("检测到当前缓存中共有{}个目录:".format(length)) print("检测到当前缓存中共有{}个目录:".format(length))
case = {} case = {}
for i in range(length): for i in range(length):

Loading…
Cancel
Save