diff --git a/bin/async_capture.py b/bin/async_capture.py index 361519e7..c42775b9 100755 --- a/bin/async_capture.py +++ b/bin/async_capture.py @@ -51,14 +51,20 @@ class AsyncCapture(AbstractManager): to_capture: Dict[str, str] = self.redis.hgetall(uuid) + if get_config('generic', 'default_public'): + # By default, the captures are on the index, unless the user mark them as un-listed + listing = False if ('listing' in to_capture and to_capture['listing'].lower() in ['false', '0', '']) else True + else: + # By default, the captures are not on the index, unless the user mark them as listed + listing = True if ('listing' in to_capture and to_capture['listing'].lower() in ['true', '1']) else False + self.logger.info(f'Capturing {to_capture["url"]} - {uuid}') success, error_message = self._capture( to_capture['url'], perma_uuid=uuid, cookies_pseudofile=to_capture.get('cookies', None), depth=int(to_capture.get('depth', 1)), - # By default, the captures are on the index, unless the user mark them as un-listed - listing=False if ('listing' in to_capture and to_capture['listing'].lower() in ['false', '0', '']) else True, + listing=listing, user_agent=to_capture.get('user_agent', None), referer=to_capture.get('referer', None), proxy=to_capture.get('proxy', None),