Merge branch 'master' of https://github.com/lixiang0/WEB_KG
This commit is contained in:
commit
7a1739ed8c
@ -3,7 +3,7 @@
|
||||
|
||||
- 如果是项目问题,请提issue。
|
||||
- 如果涉及到不方便公开的,请发邮件。
|
||||
- ChatBot请访问[链接](http://bot.rubenxiao.com)
|
||||
- ChatBot请访问[链接](http://121.42.138.77:8889/)
|
||||
|
||||
# 开源web知识图谱项目
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user