diff --git a/spider/task.py b/spider/task.py index f4b7c09..279eb81 100644 --- a/spider/task.py +++ b/spider/task.py @@ -453,7 +453,7 @@ def playwright_post(cookies, content, image_key=None): context.close() browser.close() - key = f'{uuid.uuid4()}.png' + key = f'screenshot/{uuid.uuid4()}.png' put_object(key, screenshot_content) return {'response_url': post_url, 'screenshot_key': key} @@ -522,7 +522,7 @@ def playwright_comment(cookies, target_url, content, image_key=None): context.close() browser.close() - key = f'{uuid.uuid4()}.png' + key = f'screenshot/{uuid.uuid4()}.png' put_object(key, screenshot_content) return { 'response_url': target_url, @@ -1012,7 +1012,7 @@ def playwright_share(cookies, target_url, content): context.close() browser.close() - key = f'{uuid.uuid4()}.png' + key = f'screenshot/{uuid.uuid4()}.png' put_object(key, screenshot_content) return {'response_url': post_url, 'screenshot_key': key}