mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-07 12:24:51 +00:00
Fix ocr and melong domain
This commit is contained in:
parent
fb46766751
commit
4a72e140f2
4 changed files with 6 additions and 4 deletions
|
|
@ -28,7 +28,7 @@ MOD_NOLOAD = ["subscene_dl"]
|
||||||
HELPABLE = {}
|
HELPABLE = {}
|
||||||
cleanmode = {}
|
cleanmode = {}
|
||||||
botStartTime = time.time()
|
botStartTime = time.time()
|
||||||
misskaty_version = "v2.023.5.16 - Stable"
|
misskaty_version = "v2.023.5.29 - Stable"
|
||||||
|
|
||||||
pymonclient = MongoClient(DATABASE_URI)
|
pymonclient = MongoClient(DATABASE_URI)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ async def ceksub(self: Client, ctx: Message, strings):
|
||||||
@use_chat_lang()
|
@use_chat_lang()
|
||||||
async def convertsrt(self: Client, ctx: Message, strings):
|
async def convertsrt(self: Client, ctx: Message, strings):
|
||||||
reply = ctx.reply_to_message
|
reply = ctx.reply_to_message
|
||||||
if not reply and not reply.document and not (reply.document.file_name.endswith(".vtt") or reply.document.file_name.endswith(".ass")):
|
if not reply or not reply.document and not (reply.document.file_name.endswith(".vtt") or reply.document.file_name.endswith(".ass")):
|
||||||
return await ctx.reply_msg(strings("conv_sub_help").format(cmd=ctx.command[0]), del_in=5)
|
return await ctx.reply_msg(strings("conv_sub_help").format(cmd=ctx.command[0]), del_in=5)
|
||||||
msg = await ctx.reply_msg(strings("convert_str"), quote=True)
|
msg = await ctx.reply_msg(strings("convert_str"), quote=True)
|
||||||
if not os.path.exists("downloads"):
|
if not os.path.exists("downloads"):
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ __HELP__ = "/ocr [reply to photo] - Read Text From Image"
|
||||||
@use_chat_lang()
|
@use_chat_lang()
|
||||||
async def ocr(self: Client, ctx: Message, strings):
|
async def ocr(self: Client, ctx: Message, strings):
|
||||||
reply = ctx.reply_to_message
|
reply = ctx.reply_to_message
|
||||||
if not reply or not reply.photo or not (reply.document and reply.document.mime_type.startswith("image")) or not reply.sticker:
|
if not reply or not (reply.document and reply.document.mime_type.startswith("image")) or not reply.sticker:
|
||||||
return await ctx.reply_msg(strings("no_photo").format(cmd=ctx.command[0]), quote=True, del_in=6)
|
return await ctx.reply_msg(strings("no_photo").format(cmd=ctx.command[0]), quote=True, del_in=6)
|
||||||
msg = await ctx.reply_msg(strings("read_ocr"), quote=True)
|
msg = await ctx.reply_msg(strings("read_ocr"), quote=True)
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import re
|
||||||
import logging
|
import logging
|
||||||
import traceback
|
import traceback
|
||||||
import cloudscraper
|
import cloudscraper
|
||||||
|
from database import dbname
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from pykeyboard import InlineKeyboard, InlineButton
|
from pykeyboard import InlineKeyboard, InlineButton
|
||||||
from pyrogram import filters, Client
|
from pyrogram import filters, Client
|
||||||
|
|
@ -39,12 +40,13 @@ headers = {"User-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
SCRAP_DICT = {}
|
SCRAP_DICT = {}
|
||||||
data_kuso = {}
|
data_kuso = {}
|
||||||
|
webdb = dbname.web
|
||||||
|
|
||||||
web = {
|
web = {
|
||||||
"yasirapi": "https://yasirapi.eu.org",
|
"yasirapi": "https://yasirapi.eu.org",
|
||||||
"pahe": "https://pahe.li",
|
"pahe": "https://pahe.li",
|
||||||
"savefilm21": "https://savefilm21.store",
|
"savefilm21": "https://savefilm21.store",
|
||||||
"melongmovie": "http://146.190.193.128",
|
"melongmovie": "https://melongmovie.site",
|
||||||
"terbit21": "https://terbit21.art",
|
"terbit21": "https://terbit21.art",
|
||||||
"lk21": "https://nonton.lk21official.wiki",
|
"lk21": "https://nonton.lk21official.wiki",
|
||||||
"gomov": "https://gomov.bio",
|
"gomov": "https://gomov.bio",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue