current_href.set(bookmark.href)
await self.check_bookmark_async(bookmark)
+ async def get_url(self, bookmark, url, accept_charset=False):
+ if bookmark.href not in self.logs:
+ self.logs[bookmark.href] = []
+ current_href.set(bookmark.href)
+ return await super(robot_multiaio, self).get_url(
+ bookmark, url, accept_charset=accept_charset)
+
def wait(self):
self.loop.run_until_complete(self.wait_async())
task = asyncio.create_task(
self.check_bookmark_async_log(bookmark))
bookmarks[href] = [bookmark, None, task]
- self.logs[href] = []
+ if href not in self.logs:
+ self.logs[href] = []
pending.add(task)
task.href = href
__license__ = "GNU GPL"
import argparse
+import asyncio
import sys
from bkmk_objects import Bookmark
bookmark.parent = None
error, redirect_code, redirect_to, headers, content = \
- robot.get_url(bookmark, url, True)
+ asyncio.run(robot.get_url(bookmark, url, True))
robot.stop()
if error: