fix worker not found, progress checker still needs work
This commit is contained in:
parent
b017e208a2
commit
b4a7555104
@ -91,15 +91,14 @@ async def save_to_zotero(url, headless_mode="new"):
|
||||
|
||||
print("[*] Finding Zotero Connector service worker...")
|
||||
worker = None
|
||||
for i in range(10):
|
||||
for i in range(60):
|
||||
for w in browser_context.service_workers:
|
||||
if EXTENSION_ID in w.url:
|
||||
if "background-worker.js" in w.url or "zotero" in w.url:
|
||||
worker = w
|
||||
break
|
||||
if worker:
|
||||
break
|
||||
await asyncio.sleep(0.5)
|
||||
|
||||
if not worker:
|
||||
print("[!] Could not find Zotero extension service worker.")
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user