def manageWork(self):
#file = open("/home/ddimitrov/20160305_en_wikilinks/tmp/missing_article_ids.p",'r')
file = open(SSD_HOME+"pickle/redirects_ids.obj",'r')
object_file = pickle.load(file)
#print object_file
#print type(object_file)
for root, dirs, files in os.walk(STATIC_HTML_DUMP_ARTICLES_DIR+self.path):
for i, file_name in enumerate(files):
if file_name.endswith(".zip"):
parts = file_name.split('_')
if long(parts[1]) in object_file:
try:
self.parse_article(file_name,root)
except Exception as e:
print("FILENAME_FAIL:"+file_name)
print(type(e)) # the exception instance
print(e)
print (e.message)
redirectscandidatespostioninserter.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录