mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-07 12:24:51 +00:00
Merge
This commit is contained in:
parent
043798e32e
commit
df4dbb76ba
3 changed files with 76 additions and 78 deletions
|
|
@ -96,6 +96,8 @@ def get_provider(url):
|
||||||
name = "Google Play Movies"
|
name = "Google Play Movies"
|
||||||
elif names[0] == "hbogoasia":
|
elif names[0] == "hbogoasia":
|
||||||
name = "HBOGo Asia"
|
name = "HBOGo Asia"
|
||||||
|
elif names[0] == "maxstream":
|
||||||
|
name = "MaxStream"
|
||||||
return name.title()
|
return name.title()
|
||||||
|
|
||||||
netloc = urlparse(url).netloc
|
netloc = urlparse(url).netloc
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,8 @@ async def imdb_choose(_, m):
|
||||||
ranval = get_random_string(4)
|
ranval = get_random_string(4)
|
||||||
LIST_CARI[ranval] = kuery
|
LIST_CARI[ranval] = kuery
|
||||||
buttons.row(
|
buttons.row(
|
||||||
InlineButton("🇺🇸 English", f"imdbcari_en#{ranval}#{m.from_user.id}"),
|
InlineButton("🇺🇸 English", f"imdbcari#eng#{ranval}#{m.from_user.id}"),
|
||||||
InlineButton("🇮🇩 Indonesia", f"imdcari_id#{ranval}#{m.from_user.id}"),
|
InlineButton("🇮🇩 Indonesia", f"imdcari#ind#{ranval}#{m.from_user.id}"),
|
||||||
)
|
)
|
||||||
buttons.row(InlineButton("🚩 Set Default Language", f"imdbset#{m.from_user.id}"))
|
buttons.row(InlineButton("🚩 Set Default Language", f"imdbset#{m.from_user.id}"))
|
||||||
buttons.row(InlineButton("❌ Close", f"close#{m.from_user.id}"))
|
buttons.row(InlineButton("❌ Close", f"close#{m.from_user.id}"))
|
||||||
|
|
@ -186,10 +186,11 @@ async def imdb_search_en(kueri, message):
|
||||||
await k.edit_caption(f"Failed when requesting movies title.\n\n<b>ERROR:</b> <code>{err}</code>")
|
await k.edit_caption(f"Failed when requesting movies title.\n\n<b>ERROR:</b> <code>{err}</code>")
|
||||||
|
|
||||||
|
|
||||||
@app.on_callback_query(filters.regex("^imdcari_id"))
|
@app.on_callback_query(filters.regex("^imdcari"))
|
||||||
async def imdbcari_id(client, query):
|
async def imdbcari(client, query):
|
||||||
BTN = []
|
BTN = []
|
||||||
i, msg, uid = query.data.split("#")
|
i, lang, msg, uid = query.data.split("#")
|
||||||
|
if lang == "ind":
|
||||||
if query.from_user.id != int(uid):
|
if query.from_user.id != int(uid):
|
||||||
return await query.answer("⚠️ Akses Ditolak!", True)
|
return await query.answer("⚠️ Akses Ditolak!", True)
|
||||||
try:
|
try:
|
||||||
|
|
@ -223,12 +224,7 @@ async def imdbcari_id(client, query):
|
||||||
await query.message.edit_caption(msg, reply_markup=buttons)
|
await query.message.edit_caption(msg, reply_markup=buttons)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
await query.message.edit_caption(f"Ooppss, gagal mendapatkan daftar judul di IMDb.\n\n<b>ERROR:</b> <code>{err}</code>")
|
await query.message.edit_caption(f"Ooppss, gagal mendapatkan daftar judul di IMDb.\n\n<b>ERROR:</b> <code>{err}</code>")
|
||||||
|
else:
|
||||||
|
|
||||||
@app.on_callback_query(filters.regex("^imdbcari_en"))
|
|
||||||
async def imdbcari_en(client, query):
|
|
||||||
BTN = []
|
|
||||||
i, msg, uid = query.data.split("#")
|
|
||||||
if query.from_user.id != int(uid):
|
if query.from_user.id != int(uid):
|
||||||
return await query.answer("⚠️ Access Denied!", True)
|
return await query.answer("⚠️ Access Denied!", True)
|
||||||
try:
|
try:
|
||||||
|
|
@ -279,7 +275,7 @@ async def imdb_id_callback(_, query):
|
||||||
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 = f"<code>{r_json.get('@type', '')}</code>"
|
typee = r_json.get('@type', '')
|
||||||
res_str = ""
|
res_str = ""
|
||||||
if judul := r_json.get("name"):
|
if judul := r_json.get("name"):
|
||||||
try:
|
try:
|
||||||
|
|
@ -408,7 +404,7 @@ async def imdb_en_callback(bot, query):
|
||||||
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 = f"<code>{r_json.get('@type', '')}</code>"
|
typee = r_json.get('@type', '')
|
||||||
res_str = ""
|
res_str = ""
|
||||||
if judul := r_json.get("name"):
|
if judul := r_json.get("name"):
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -439,7 +439,7 @@ async def imdb_inl(_, query):
|
||||||
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["name"], "en_ID")
|
ott = await search_jw(r_json["name"], "en_ID")
|
||||||
res_str = ""
|
res_str = ""
|
||||||
typee = f"<code>{r_json['@type']}</code>" if r_json.get("@type") else ""
|
typee = r_json.get('@type', '')
|
||||||
if r_json.get("name"):
|
if r_json.get("name"):
|
||||||
try:
|
try:
|
||||||
tahun = sop.select('ul[data-testid="hero-title-block__metadata"]')[0].find("span", class_="sc-8c396aa2-2 jwaBvf").text
|
tahun = sop.select('ul[data-testid="hero-title-block__metadata"]')[0].find("span", class_="sc-8c396aa2-2 jwaBvf").text
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue