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:
2025-10-30 16:59:04 +01:00
parent aa0be5d905
commit 6f3eee90bb
9 changed files with 326 additions and 32 deletions
+8 -6
View File
@@ -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)