diff --git a/Dockerfile b/Dockerfile
index fe9af8c..77d217a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,12 +1,13 @@
-FROM python:3.8-slim-buster
+FROM python:3.10
RUN apt update && apt upgrade -y
RUN apt install git -y
COPY requirements.txt /requirements.txt
RUN cd /
-RUN pip3 install -U pip && pip3 install -U -r requirements.txt
-RUN mkdir /EvaMaria
-WORKDIR /EvaMaria
-COPY start.sh /start.sh
-CMD ["/bin/bash", "/start.sh"]
+RUN pip install -U pip && pip install -U -r requirements.txt
+WORKDIR /app
+
+COPY . .
+
+CMD ["python", "bot.py"]
diff --git a/Script.py b/Script.py
index 39e7c18..cb9c521 100644
--- a/Script.py
+++ b/Script.py
@@ -4,7 +4,7 @@ class script(object):
HELP_TXT = """π·π΄π {}
π·π΄ππ΄ πΈπ ππ·π΄ π·π΄π»πΏ π΅πΎπ πΌπ π²πΎπΌπΌπ°π½π³π."""
ABOUT_TXT = """β― πΌπ π½π°πΌπ΄: {}
-β― π²ππ΄π°ππΎπ: Team Eva Maria
+β― π²ππ΄π°ππΎπ: Jatt Hacker
β― π»πΈπ±ππ°ππ: πΏπππΎπΆππ°πΌ
β― π»π°π½πΆππ°πΆπ΄: πΏπππ·πΎπ½ πΉ
β― π³π°ππ° π±π°ππ΄: πΌπΎπ½πΆπΎ π³π±
diff --git a/bot.py b/bot.py
index 8bb7a23..f6d19fd 100644
--- a/bot.py
+++ b/bot.py
@@ -16,6 +16,10 @@
from typing import Union, Optional, AsyncGenerator
from pyrogram import types
+from plugins.render import web_server
+from aiohttp import web
+
+
class Bot(Client):
def __init__(self):
@@ -42,6 +46,10 @@ async def start(self):
self.username = '@' + me.username
logging.info(f"{me.first_name} with for Pyrogram v{__version__} (Layer {layer}) started on {me.username}.")
logging.info(LOG_STR)
+ app = web.AppRunner(await web_server())
+ await app.setup()
+ bind_address = "0.0.0.0"
+ await web.TCPSite(app, bind_address, 8080).start()
async def stop(self, *args):
await super().stop()
diff --git a/info.py b/info.py
index 4e98afd..035e911 100644
--- a/info.py
+++ b/info.py
@@ -39,10 +39,10 @@ def is_enabled(value, default):
# Others
LOG_CHANNEL = int(environ.get('LOG_CHANNEL', 0))
SUPPORT_CHAT = environ.get('SUPPORT_CHAT', 'TeamEvamaria')
-P_TTI_SHOW_OFF = is_enabled((environ.get('P_TTI_SHOW_OFF', "False")), False)
-IMDB = is_enabled((environ.get('IMDB', "False")), False)
-SINGLE_BUTTON = is_enabled((environ.get('SINGLE_BUTTON', "False")), False)
-CUSTOM_FILE_CAPTION = environ.get("CUSTOM_FILE_CAPTION", None)
+P_TTI_SHOW_OFF = is_enabled((environ.get('P_TTI_SHOW_OFF', "True")), True)
+IMDB = is_enabled((environ.get('IMDB', "True")), True)
+SINGLE_BUTTON = is_enabled((environ.get('SINGLE_BUTTON', "True")), True)
+CUSTOM_FILE_CAPTION = environ.get("CUSTOM_FILE_CAPTION", "{file_name}\n\nββββββ’β
β’Β°β’ββ’Β°β’β
β’β’βββββ\nβ°π ππ¨π’π§Β [ ππππ£ πΎπππ£π£ππ‘ ](https://t.me/pthan_Moviess)Β πβ°\nββββββ’β
β’Β°β’ββ’Β°β’β
β’βββββ")
BATCH_FILE_CAPTION = environ.get("BATCH_FILE_CAPTION", CUSTOM_FILE_CAPTION)
IMDB_TEMPLATE = environ.get("IMDB_TEMPLATE", "Query: {query} \nββββIMDb Data:\n\nπ· Title: {title}\nπ Genres: {genres}\nπ Year: {year}\nπ Rating: {rating} / 10")
LONG_IMDB_DESCRIPTION = is_enabled(environ.get("LONG_IMDB_DESCRIPTION", "False"), False)
@@ -65,8 +65,8 @@ def is_enabled(value, default):
LOG_STR += f"Your current IMDB template is {IMDB_TEMPLATE}"
-SHORTENER_API = environ.get("SHORTENER_API", "JpGXQftImASQY61nnRJThoHvZ153")
+SHORTENER_SITE = environ.get("SHORTENER_SITE", "tinyfy.in")
+SHORTENER_API = environ.get("SHORTENER_API", "3d1a7d47944434c0663c069e8b73fcc04d1d19e7")
LONG_DROPLINK_URL = environ.get("LONG_DROPLINK_URL", False)
-
diff --git a/plugins/commands.py b/plugins/commands.py
index e9f04b2..bb9c01c 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -23,7 +23,7 @@ async def start(client, message):
if message.chat.type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
buttons = [
[
- InlineKeyboardButton('π€ Updates', url='https://t.me/TeamEvamaria')
+ InlineKeyboardButton('π€ Updates', url='https://t.me/pthan_Moviess')
],
[
InlineKeyboardButton('βΉοΈ Help', url=f"https://t.me/{temp.U_NAME}?start=help"),
@@ -45,7 +45,7 @@ async def start(client, message):
InlineKeyboardButton('β Add Me To Your Groups β', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
],[
InlineKeyboardButton('π Search', switch_inline_query_current_chat=''),
- InlineKeyboardButton('π€ Updates', url='https://t.me/TeamEvamaria')
+ InlineKeyboardButton('π€ Updates', url='https://t.me/pthan_Moviess')
],[
InlineKeyboardButton('βΉοΈ Help', callback_data='help'),
InlineKeyboardButton('π About', callback_data='about')
@@ -91,7 +91,7 @@ async def start(client, message):
InlineKeyboardButton('β Add Me To Your Groups β', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
],[
InlineKeyboardButton('π Search', switch_inline_query_current_chat=''),
- InlineKeyboardButton('π€ Updates', url='https://t.me/TeamEvamaria')
+ InlineKeyboardButton('π€ Updates', url='https://t.me/pthan_Moviess')
],[
InlineKeyboardButton('βΉοΈ Help', callback_data='help'),
InlineKeyboardButton('π About', callback_data='about')
@@ -245,7 +245,14 @@ async def start(client, message):
file_id=file_id,
caption=f_caption,
protect_content=True if pre == 'filep' else False,
+ reply_markup=InlineKeyboardMarkup(
+ [
+ [
+ InlineKeyboardButton('β»οΈ ππ¨π’π§ ππ§π€πͺπ₯ ', url="https://t.me/+ZONAmseBbjZoPdoq")
+ ]
+ ]
)
+ )
@Client.on_message(filters.command('channel') & filters.user(ADMINS))
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 73126c8..391f574 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -107,6 +107,9 @@ async def next_page(bot, query):
InlineKeyboardButton("NEXT β©", callback_data=f"next_{req}_{key}_{n_offset}")
],
)
+ btn.insert(0, [
+ InlineKeyboardButton("πΉ How to download πΉ", url='https://t.me/Actor_Actores_collection/287')
+ ])
try:
await query.edit_message_reply_markup(
reply_markup=InlineKeyboardMarkup(btn)
@@ -407,7 +410,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton('β Add Me To Your Groups β', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
], [
InlineKeyboardButton('π Search', switch_inline_query_current_chat=''),
- InlineKeyboardButton('π€ Updates', url='https://t.me/TeamEvamaria')
+ InlineKeyboardButton('π€ Updates', url='https://t.me/pthan_Moviess')
], [
InlineKeyboardButton('βΉοΈ Help', callback_data='help'),
InlineKeyboardButton('π About', callback_data='about')
@@ -673,6 +676,9 @@ async def auto_filter(client, msg, spoll=False):
btn.append(
[InlineKeyboardButton(text="π 1/1", callback_data="pages")]
)
+ btn.insert(0, [
+ InlineKeyboardButton("πΉ How to download πΉ", url='https://t.me/Actor_Actores_collection/287')
+ ])
imdb = await get_poster(search, file=(files[0]).file_name) if settings["imdb"] else None
TEMPLATE = settings['template']
if imdb:
@@ -711,8 +717,7 @@ async def auto_filter(client, msg, spoll=False):
cap = f"Here is what i found for your query {search}"
if imdb and imdb.get('poster'):
try:
- await message.reply_photo(photo=imdb.get('poster'), caption=cap[:1024],
- reply_markup=InlineKeyboardMarkup(btn))
+ await message.reply_photo(photo=imdb.get('poster'), caption=cap[:1024],reply_markup=InlineKeyboardMarkup(btn))
except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty):
pic = imdb.get('poster')
poster = pic.replace('.jpg', "._V1_UX360.jpg")
@@ -776,9 +781,11 @@ async def advantage_spell_chok(msg):
)
] for k, movie in enumerate(movielist)]
btn.append([InlineKeyboardButton(text="Close", callback_data=f'spolling#{user}#close_spellcheck')])
- await msg.reply("I couldn't find anything related to that\nDid you mean any one of these?",
+ kb= await msg.reply("I couldn't find anything related to that\nDid you mean any one of these?",
reply_markup=InlineKeyboardMarkup(btn))
-
+ await asyncio.sleep(300)
+ await kb.delete()
+ await msg.delete()
async def manual_filters(client, message, text=False):
group_id = message.chat.id
diff --git a/plugins/render.py b/plugins/render.py
new file mode 100644
index 0000000..fc62d79
--- /dev/null
+++ b/plugins/render.py
@@ -0,0 +1,12 @@
+from aiohttp import web
+
+routes = web.RouteTableDef()
+
+@routes.get("/", allow_head=True)
+async def root_route_handler(request):
+ return web.json_response("Mα΄Ι΄ Bα΄α΄α΄’")
+
+async def web_server():
+ web_app = web.Application(client_max_size=30000000)
+ web_app.add_routes(routes)
+ return web_app
diff --git a/requirements.txt b/requirements.txt
index 810c373..311feff 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,5 +6,5 @@ marshmallow==3.14.1
umongo==3.0.1
requests
bs4
-imdbpy==2021.4.18
+git+https://github.com/cinemagoer/cinemagoer
shortzy
diff --git a/start.sh b/start.sh
deleted file mode 100644
index fb1333b..0000000
--- a/start.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-if [ -z $UPSTREAM_REPO ]
-then
- echo "Cloning main Repository"
- git clone https://github.com/EvamariaTG/EvaMaria.git /EvaMaria
-else
- echo "Cloning Custom Repo from $UPSTREAM_REPO "
- git clone $UPSTREAM_REPO /EvaMaria
-fi
-cd /EvaMaria
-pip3 install -U -r requirements.txt
-echo "Starting Bot...."
-python3 bot.py
\ No newline at end of file
diff --git a/utils.py b/utils.py
index 215b9b9..6ca6a14 100644
--- a/utils.py
+++ b/utils.py
@@ -2,7 +2,7 @@
import shortzy
from pyrogram.errors import InputUserDeactivated, UserNotParticipant, FloodWait, UserIsBlocked, PeerIdInvalid
from info import LONG_DROPLINK_URL, SHORTENER_API, AUTH_CHANNEL, LONG_IMDB_DESCRIPTION, MAX_LIST_ELM
-from imdb import IMDb
+from imdb import Cinemagoer
import asyncio
from pyrogram.types import Message, InlineKeyboardButton
from pyrogram import enums
@@ -22,7 +22,7 @@
r"(\[([^\[]+?)\]\((buttonurl|buttonalert):(?:/{0,2})(.+?)(:same)?\))"
)
-imdb = IMDb()
+imdb = Cinemagoer()
BANNED = {}
SMART_OPEN = 'β'
@@ -379,7 +379,7 @@ def humanbytes(size):
#shortzy
-shortz = shortzy.Shortzy(SHORTENER_API, "shareus.in")
+shortz = shortzy.Shortzy(SHORTENER_API, "omegalinks.in")
async def get_shortlink(link):
if SHORTENER_API:
if LONG_DROPLINK_URL =="True" or LONG_DROPLINK_URL is True: