This commit is contained in:
Your Name 2019-05-12 19:01:18 +08:00
commit 7a1739ed8c
2 changed files with 10 additions and 11 deletions

View File

@ -3,7 +3,7 @@
- 如果是项目问题请提issue。
- 如果涉及到不方便公开的,请发邮件。
- ChatBot请访问[链接](http://bot.rubenxiao.com)
- ChatBot请访问[链接](http://121.42.138.77:8889/)
# 开源web知识图谱项目

View File

@ -38,16 +38,15 @@ class MyThread(threading.Thread):
output.close()
def run(self):
try:
while(True):
if len(pages)>0:
lock.acquire()
page=pages[0]
pages.remove(page)
lock.release()
self.extract(page)
lock.acquire()
paged.append(page)
lock.release()
while len(pages)>0 and self.running:
lock.acquire()
page=pages[0]
pages.remove(page)
lock.release()
self.extract(page)
lock.acquire()
paged.append(page)
lock.release()
except Exception as e:
print('fail to extract..',str(e))
fail_file.write(page)