Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewZMSU committed Nov 21, 2024
1 parent a5dde45 commit 7bfb246
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scrapypuppeteer/browser_managers/playwright_browser_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import base64
import uuid
from dataclasses import dataclass
from typing import Awaitable, Callable, Dict, Union, Any
from json import dumps
from traceback import format_exc
from typing import Any, Awaitable, Callable, Dict, Union

from playwright.async_api import Browser, BrowserContext, Page, async_playwright
from scrapy.http import TextResponse
Expand Down Expand Up @@ -119,7 +119,13 @@ async def __perform_action(self, request):
return TextResponse(
request.url,
headers={"Content-Type": "application/json"},
body=dumps({"error": format_exc(), "contextId": page.context_id, "pageId": page.page_id}),
body=dumps(
{
"error": format_exc(),
"contextId": page.context_id,
"pageId": page.page_id,
}
),
status=500,
encoding="utf-8",
)
Expand Down

0 comments on commit 7bfb246

Please sign in to comment.