timeout = 60
ftp_timeout = 60
+ report_checked = True
+
def __init__(self, *args, **kw):
for attr in 'timeout', 'ftp_timeout':
value = getattr(self, attr)
return self.__class__.__name__
def check_bookmark(self, bookmark):
+ if self.report_checked:
+ self.log('Checked: %s' % bookmark.href)
return asyncio.run(self.check_bookmark_async(bookmark))
async def check_bookmark_async(self, bookmark):
log_lines = []
robot = import_robot('requests')
set_params(robot, robot_params)
+ robot.report_checked = False
robot(log_lines.append).check_bookmark(bookmark)
return bookmark, log_lines
class multi_mixin:
max_urls = 10 # Small default
+ report_checked = False
def __init__(self, *args, **kw):
if isinstance(self.max_urls, str):