add common resolutions to screenshot
This commit is contained in:
parent
b15d0ad34c
commit
4f7d76d5d5
1 changed files with 12 additions and 0 deletions
|
@ -112,6 +112,18 @@ class ScreenshotCog(commands.Cog):
|
|||
)
|
||||
driver.set_page_load_timeout(load_timeout)
|
||||
if resolution:
|
||||
common = {
|
||||
"8k": "7680x4320",
|
||||
"4k": "3840x2160",
|
||||
"1440p": "2560x1440",
|
||||
"1080p": "1920x1080",
|
||||
"720p": "1280x720",
|
||||
"480p": "854x480",
|
||||
"360p": "640x360",
|
||||
"240p": "426x240",
|
||||
"144p": "256x144"
|
||||
}
|
||||
resolution = common.get(resolution.lower(), resolution)
|
||||
try:
|
||||
width, height = map(int, resolution.split("x"))
|
||||
driver.set_window_size(width, height)
|
||||
|
|
Loading…
Reference in a new issue