Reference for youtube_dl_scraper/utils/playwright_runner.py
¶
youtube_dl_scraper.utils.playwright_runner.Playwright
¶
A class that interacts with the Playwright service to execute code remotely.
Attributes:
Name | Type | Description |
---|---|---|
available_languages |
list
|
A list of supported programming languages for remote code execution. |
server |
str
|
The URL endpoint for the Playwright service. |
run
staticmethod
¶
Executes a code snippet remotely using Playwright's cloud service.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
code
|
str
|
The code to be executed remotely. |
required |
language
|
str
|
The programming language in which the code is written. Default is "python". |
'python'
|
Returns:
Name | Type | Description |
---|---|---|
dict |
Dict[str, Optional[str]]
|
A dictionary containing the execution result with keys such as |
Raises:
Type | Description |
---|---|
ValueError
|
If the provided language is not supported. |
PlaywrightError
|
If an error occurs during the HTTP request or code execution. |