mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Fix
This commit is contained in:
parent
c3902d0c9f
commit
222c4889ea
1 changed files with 2 additions and 9 deletions
|
|
@ -24,14 +24,8 @@ async def ddl_mediainfo(_, message, url):
|
|||
"""
|
||||
|
||||
try:
|
||||
filename = re.search(".+/(.+)", url).group(1)
|
||||
reply_msg = await kirimPesan(message, "Generating Mediainfo, Please wait..", quote=True)
|
||||
|
||||
with requests.get(url, stream=True) as r:
|
||||
with open(filename, 'wb') as f:
|
||||
for chunk in r.iter_content(50000000): f.write(chunk); break
|
||||
|
||||
output_ = await runcmd(f'mediainfo "{filename}"')
|
||||
output_ = await runcmd(f'mediainfo "{url}"')
|
||||
out = output_[0] if len(output_) != 0 else None
|
||||
content = f"""
|
||||
MissKatyBot MediaInfo
|
||||
|
|
@ -41,8 +35,7 @@ DETAILS
|
|||
"""
|
||||
output = await post_to_telegraph(False, "MissKaty MediaInfo", content)
|
||||
|
||||
await editPesan(reply_msg, f"**File Name :** `{unquote(filename)}`\n\n**Mediainfo :** {output}", disable_web_page_preview=True)
|
||||
os.remove(filename)
|
||||
await editPesan(reply_msg, f"**Link :** `{url}`\n\n**Mediainfo :** {output}", disable_web_page_preview=True)
|
||||
|
||||
except Exception as err:
|
||||
await hapusPesan(reply_msg)
|
||||
|
|
|
|||
Loading…
Reference in a new issue