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.
21 lines
520 B
21 lines
520 B
import archive |
|
import database |
|
import json |
|
|
|
database.init() |
|
archive.init() |
|
|
|
with archive.ix.searcher() as searcher: |
|
for docnum in searcher.document_numbers(): |
|
try: |
|
#if docnum > 500: |
|
# break |
|
|
|
print('docnum', docnum) |
|
res = searcher.stored_fields(docnum) |
|
print('id', res['id']) |
|
database.put_story(res['story']) |
|
print() |
|
except BaseException as e: |
|
print('skipping', docnum) |
|
print('reason:', e)
|
|
|