Improve webss feature with new API

Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
This commit is contained in:
Yasir Aris M 2024-06-23 16:06:46 +07:00 committed by GitHub
parent 21b82c903a
commit db06c74ddf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,8 +32,8 @@ async def take_ss(_, ctx: Message, strings):
download_file_path = os.path.join("downloads/", f"webSS_{ctx.from_user.id}.png") download_file_path = os.path.join("downloads/", f"webSS_{ctx.from_user.id}.png")
msg = await ctx.reply_msg(strings("wait_str")) msg = await ctx.reply_msg(strings("wait_str"))
try: try:
url = f"https://webss.yasirapi.eu.org/api?url={url}&width=1280&height=720" url = f"https://webss.yasirweb.eu.org/api/screenshot?resX=1280&resY=900&outFormat=jpg&waitTime=100&isFullPage=false&dismissModals=false&url={url}"
downloader = SmartDL(url, download_file_path, progress_bar=False, timeout=10, verify=False) downloader = SmartDL(url, download_file_path, progress_bar=False, timeout=15, verify=False)
downloader.start(blocking=True) downloader.start(blocking=True)
await gather( await gather(
*[ *[