mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-05 19:44:51 +00:00
Minor FIx (#97)
This commit is contained in:
parent
68d006607f
commit
bf4d1b7195
3 changed files with 23 additions and 17 deletions
|
|
@ -4,11 +4,16 @@
|
||||||
# * Copyright ©YasirPedia All rights reserved
|
# * Copyright ©YasirPedia All rights reserved
|
||||||
|
|
||||||
# Base Docker Using Ubuntu 23.04, Python 3.11 and Built In Pip
|
# Base Docker Using Ubuntu 23.04, Python 3.11 and Built In Pip
|
||||||
FROM yasirarism/misskaty-docker:latest
|
## With Built in Pip Package
|
||||||
|
# FROM yasirarism/misskaty-docker:latest
|
||||||
|
## Without Built in Pip Package
|
||||||
|
FROM yasirarism/misskaty-docker:free
|
||||||
|
|
||||||
# Set Hostname
|
# Set Hostname
|
||||||
ENV HOSTNAME misskaty
|
ENV HOSTNAME misskaty
|
||||||
# Copy Files
|
# Copy Files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
# Instal pip package
|
||||||
|
RUN pip3 install --no-cache-dir -r requirements.txt --break-system-packages
|
||||||
# Set CMD Bot
|
# Set CMD Bot
|
||||||
CMD ["bash", "start.sh"]
|
CMD ["bash", "start.sh"]
|
||||||
|
|
|
||||||
|
|
@ -367,15 +367,15 @@ async def imdb_id_callback(self: Client, query: CallbackQuery):
|
||||||
return await query.answer("⚠️ Akses Ditolak!", True)
|
return await query.answer("⚠️ Akses Ditolak!", True)
|
||||||
try:
|
try:
|
||||||
await query.message.edit_caption("⏳ Permintaan kamu sedang diproses.. ")
|
await query.message.edit_caption("⏳ Permintaan kamu sedang diproses.. ")
|
||||||
url = f"https://www.imdb.com/title/tt{movie}/"
|
imdb_url = f"https://www.imdb.com/title/tt{movie}/"
|
||||||
resp = await http.get(url, headers=headers)
|
resp = await http.get(imdb_url, headers=headers)
|
||||||
sop = BeautifulSoup(resp, "lxml")
|
sop = BeautifulSoup(resp, "lxml")
|
||||||
r_json = json.loads(sop.find("script", attrs={"type": "application/ld+json"}).contents[0])
|
r_json = json.loads(sop.find("script", attrs={"type": "application/ld+json"}).contents[0])
|
||||||
ott = await search_jw(r_json.get("name"), "ID")
|
ott = await search_jw(r_json.get("name"), "ID")
|
||||||
typee = r_json.get("@type", "")
|
typee = r_json.get("@type", "")
|
||||||
res_str = ""
|
res_str = ""
|
||||||
tahun = re.findall(r"\d{4}\W\d{4}|\d{4}-?", sop.title.text)[0] if re.findall(r"\d{4}\W\d{4}|\d{4}-?", sop.title.text) else "N/A"
|
tahun = re.findall(r"\d{4}\W\d{4}|\d{4}-?", sop.title.text)[0] if re.findall(r"\d{4}\W\d{4}|\d{4}-?", sop.title.text) else "N/A"
|
||||||
res_str += f"<b>📹 Judul:</b> <a href='{url}'>{r_json.get('name')} [{tahun}]</a> (<code>{typee}</code>)\n"
|
res_str += f"<b>📹 Judul:</b> <a href='{imdb_url}'>{r_json.get('name')} [{tahun}]</a> (<code>{typee}</code>)\n"
|
||||||
if aka := r_json.get("alternateName"):
|
if aka := r_json.get("alternateName"):
|
||||||
res_str += f"<b>📢 AKA:</b> <code>{aka}</code>\n\n"
|
res_str += f"<b>📢 AKA:</b> <code>{aka}</code>\n\n"
|
||||||
else:
|
else:
|
||||||
|
|
@ -453,13 +453,13 @@ async def imdb_id_callback(self: Client, query: CallbackQuery):
|
||||||
markup = InlineKeyboardMarkup(
|
markup = InlineKeyboardMarkup(
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
InlineKeyboardButton("🎬 Open IMDB", url=url),
|
InlineKeyboardButton("🎬 Open IMDB", url=imdb_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=imdb_url)]])
|
||||||
if thumb := r_json.get("image"):
|
if thumb := r_json.get("image"):
|
||||||
try:
|
try:
|
||||||
await query.message.edit_media(
|
await query.message.edit_media(
|
||||||
|
|
@ -491,15 +491,15 @@ async def imdb_en_callback(self: Client, query: CallbackQuery):
|
||||||
return await query.answer("⚠️ Access Denied!", True)
|
return await query.answer("⚠️ Access Denied!", True)
|
||||||
try:
|
try:
|
||||||
await query.message.edit_caption("<i>⏳ Getting IMDb source..</i>")
|
await query.message.edit_caption("<i>⏳ Getting IMDb source..</i>")
|
||||||
url = f"https://www.imdb.com/title/tt{movie}/"
|
imdb_url = f"https://www.imdb.com/title/tt{movie}/"
|
||||||
resp = await http.get(url, headers=headers)
|
resp = await http.get(imdb_url, headers=headers)
|
||||||
sop = BeautifulSoup(resp, "lxml")
|
sop = BeautifulSoup(resp, "lxml")
|
||||||
r_json = json.loads(sop.find("script", attrs={"type": "application/ld+json"}).contents[0])
|
r_json = json.loads(sop.find("script", attrs={"type": "application/ld+json"}).contents[0])
|
||||||
ott = await search_jw(r_json.get("name"), "US")
|
ott = await search_jw(r_json.get("name"), "US")
|
||||||
typee = r_json.get("@type", "")
|
typee = r_json.get("@type", "")
|
||||||
res_str = ""
|
res_str = ""
|
||||||
tahun = re.findall(r"\d{4}\W\d{4}|\d{4}-?", sop.title.text)[0] if re.findall(r"\d{4}\W\d{4}|\d{4}-?", sop.title.text) else "N/A"
|
tahun = re.findall(r"\d{4}\W\d{4}|\d{4}-?", sop.title.text)[0] if re.findall(r"\d{4}\W\d{4}|\d{4}-?", sop.title.text) else "N/A"
|
||||||
res_str += f"<b>📹 Judul:</b> <a href='{url}'>{r_json.get('name')} [{tahun}]</a> (<code>{typee}</code>)\n"
|
res_str += f"<b>📹 Judul:</b> <a href='{imdb_url}'>{r_json.get('name')} [{tahun}]</a> (<code>{typee}</code>)\n"
|
||||||
if aka := r_json.get("alternateName"):
|
if aka := r_json.get("alternateName"):
|
||||||
res_str += f"<b>📢 AKA:</b> <code>{aka}</code>\n\n"
|
res_str += f"<b>📢 AKA:</b> <code>{aka}</code>\n\n"
|
||||||
else:
|
else:
|
||||||
|
|
@ -576,13 +576,13 @@ async def imdb_en_callback(self: Client, query: CallbackQuery):
|
||||||
markup = InlineKeyboardMarkup(
|
markup = InlineKeyboardMarkup(
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
InlineKeyboardButton("🎬 Open IMDB", url=url),
|
InlineKeyboardButton("🎬 Open IMDB", url=imdb_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=imdb_url)]])
|
||||||
if thumb := r_json.get("image"):
|
if thumb := r_json.get("image"):
|
||||||
try:
|
try:
|
||||||
await query.message.edit_media(
|
await query.message.edit_media(
|
||||||
|
|
|
||||||
|
|
@ -217,11 +217,12 @@ async def ytdl_cancel_callback(self: Client, cq: CallbackQuery, strings):
|
||||||
callback = cq.data.split("|")
|
callback = cq.data.split("|")
|
||||||
await cq.answer("Trying to Cancel Process..")
|
await cq.answer("Trying to Cancel Process..")
|
||||||
process_id = callback[1]
|
process_id = callback[1]
|
||||||
Process.cancel_id(process_id)
|
try:
|
||||||
if cq.message:
|
Process.cancel_id(process_id)
|
||||||
await cq.message.delete()
|
except:
|
||||||
else:
|
pass
|
||||||
await cq.edit_message_text("✔️ `Stopped Successfully`")
|
await cq.message.delete()
|
||||||
|
await cq.edit_message_text("✔️ `Stopped Successfully`")
|
||||||
|
|
||||||
|
|
||||||
@app.on_callback_query(filters.regex(r"^ytdl_scroll"))
|
@app.on_callback_query(filters.regex(r"^ytdl_scroll"))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue