mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-18 15:52:10 +00:00
Tag: 1.9
Intermediate commits (oldest → newest): - Merge branch 'main' of https://github.com/migatu/conjurer - Restart radio script - Radio restart serverside - Merge branch 'main' of https://github.com/migatu/conjurer - Typo fix ,
This commit is contained in:
@@ -33,12 +33,14 @@ def load_ndb_to_q(logger):
|
||||
try:
|
||||
ndb_database = json.load(ndb_file)
|
||||
for _ in range (1,10):
|
||||
key = next(iter(ndb_database))
|
||||
item = ndb_database.pop(key)
|
||||
logger.info(key)
|
||||
url = f"https://sci-hub.se/{key}"
|
||||
WORK_Q.put([item, url, False])
|
||||
|
||||
try:
|
||||
key = next(iter(ndb_database))
|
||||
_ = ndb_database.pop(key)
|
||||
logger.info(key)
|
||||
url = f"https://sci-hub.se/{key}"
|
||||
WORK_Q.put([key, url, False])
|
||||
except StopIteration:
|
||||
break
|
||||
ndb_file.truncate(0)
|
||||
ndb_file.seek(0)
|
||||
json.dump(ndb_database, ndb_file, indent=4)
|
||||
|
||||
Reference in New Issue
Block a user