async def _run_spider_hook(self, hook_func):
if callable(hook_func):<EOL><INDENT>try:<EOL><INDENT>aws_hook_func = hook_func(weakref.proxy(self))<EOL>if isawaitable(aws_hook_func):<EOL><INDENT>await aws_hook_func<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>self.logger.error(f'<STR_LIT>')<EOL><DEDENT><DEDENT>
Run hook before/after spider start crawling
:param hook_func: aws function
:return: