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...")
|
print("[*] Finding Zotero Connector service worker...")
|
||||||
worker = None
|
worker = None
|
||||||
for i in range(10):
|
for i in range(60):
|
||||||
for w in browser_context.service_workers:
|
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
|
worker = w
|
||||||
break
|
break
|
||||||
if worker:
|
if worker:
|
||||||
break
|
break
|
||||||
await asyncio.sleep(0.5)
|
await asyncio.sleep(0.5)
|
||||||
|
|
||||||
if not worker:
|
if not worker:
|
||||||
print("[!] Could not find Zotero extension service worker.")
|
print("[!] Could not find Zotero extension service worker.")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user