-
-
Notifications
You must be signed in to change notification settings - Fork 303
Expand file tree
/
Copy pathimdb.py
More file actions
27 lines (22 loc) · 670 Bytes
/
imdb.py
File metadata and controls
27 lines (22 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Ultroid Userbot
# <https://github.com/TeamUltroid/UltroidAddons/tree/main/imdb.py>
"""
Search movie details from IMDB
✘ Commands Available
• `{i}imdb <keyword>`
"""
from . import *
@ultroid_cmd(pattern="imdb ?(.*)")
async def imdb(e):
m = await e.eor("`...`")
movie_name = e.pattern_match.group(1)
if not movie_name:
return await eor(m, "`Provide a movie name too`")
try:
mk = await e.client.inline_query("imdbot", movie_name)
await mk[0].click(e.chat_id)
await m.delete()
except IndexError:
return await eor(m, "No Results Found...")
except Exception as er:
return await eor(m, str(er))