mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-09 13:04:51 +00:00
Change API and add justwatch
This commit is contained in:
parent
e842c888c5
commit
4a148f525a
1 changed files with 4 additions and 4 deletions
|
|
@ -369,13 +369,13 @@ async def imdb_id_callback(_, query):
|
||||||
markup = InlineKeyboardMarkup(
|
markup = InlineKeyboardMarkup(
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
InlineKeyboardButton("🎬 Open IMDB", url=url),
|
InlineKeyboardButton("🎬 Open IMDB", url=f"https://www.imdb.com{r_json['url']}"),
|
||||||
InlineKeyboardButton("▶️ Trailer", url=trailer_url),
|
InlineKeyboardButton("▶️ Trailer", url=trailer_url),
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
markup = InlineKeyboardMarkup([[InlineKeyboardButton("🎬 Open IMDB", url=url)]])
|
markup = InlineKeyboardMarkup([[InlineKeyboardButton("🎬 Open IMDB", url=f"https://www.imdb.com{r_json['url']}")]])
|
||||||
if thumb := r_json.get("image"):
|
if thumb := r_json.get("image"):
|
||||||
try:
|
try:
|
||||||
await query.message.edit_media(InputMediaPhoto(thumb, caption=res_str), reply_markup=markup)
|
await query.message.edit_media(InputMediaPhoto(thumb, caption=res_str), reply_markup=markup)
|
||||||
|
|
@ -497,13 +497,13 @@ async def imdb_en_callback(bot, query):
|
||||||
markup = InlineKeyboardMarkup(
|
markup = InlineKeyboardMarkup(
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
InlineKeyboardButton("🎬 Open IMDB", url=url),
|
InlineKeyboardButton("🎬 Open IMDB", url=f"https://www.imdb.com{r_json['url']}"),
|
||||||
InlineKeyboardButton("▶️ Trailer", url=trailer_url),
|
InlineKeyboardButton("▶️ Trailer", url=trailer_url),
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
markup = InlineKeyboardMarkup([[InlineKeyboardButton("🎬 Open IMDB", url=url)]])
|
markup = InlineKeyboardMarkup([[InlineKeyboardButton("🎬 Open IMDB", url=f"https://www.imdb.com{r_json['url']}")]])
|
||||||
if thumb := r_json.get("image"):
|
if thumb := r_json.get("image"):
|
||||||
try:
|
try:
|
||||||
await query.message.edit_media(InputMediaPhoto(thumb, caption=res_str), reply_markup=markup)
|
await query.message.edit_media(InputMediaPhoto(thumb, caption=res_str), reply_markup=markup)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue