Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UrlDown #72

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) Shrimadhav U K
# (c) Shrimadhav U K S A

# the logging things
import logging
Expand Down Expand Up @@ -28,11 +28,11 @@
root="plugins"
)
app = pyrogram.Client(
"AnyDLBot",
"All_Url_DownloaderBot",
bot_token=Config.TG_BOT_TOKEN,
api_id=Config.APP_ID,
api_hash=Config.API_HASH,
plugins=plugins
)
Config.AUTH_USERS.add(683538773)
Config.AUTH_USERS.add(1024107352)
app.run()
8 changes: 4 additions & 4 deletions plugins/dl_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ async def download_coroutine(bot, session, url, file_name, chat_id, message_id,
await bot.edit_message_text(
chat_id,
message_id,
text="""Initiating Download
text="""Yuklash natijasi
URL: {}
File Size: {}""".format(url, humanbytes(total_length))
File hajmi: {}""".format(url, humanbytes(total_length))
)
with open(file_name, "wb") as f_handle:
while True:
Expand All @@ -290,8 +290,8 @@ async def download_coroutine(bot, session, url, file_name, chat_id, message_id,
try:
current_message = """**Download Status**
URL: {}
File Size: {}
Downloaded: {}
File hajmi: {}
Yuklash: {}
ETA: {}""".format(
url,
humanbytes(total_length),
Expand Down
4 changes: 2 additions & 2 deletions plugins/youtube_dl_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,9 @@ async def youtube_dl_call_back(bot, update):
media_album_p = []
if images is not None:
i = 0
caption = "© @TGBotsZ"
caption = "© @SalomovAsliddin"
if is_w_f:
caption = "/upgrade to Plan D to remove the watermark\n© @AnyDLBot"
caption = "/upgrade to Plan D to remove the watermark\n© @All_Url_DownloaderBot"
for image in images:
if os.path.exists(str(image)):
if i == 0:
Expand Down
6 changes: 3 additions & 3 deletions plugins/youtube_dl_echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ async def echo(bot, update):
try:
user = await bot.get_chat_member(update_channel, update.chat.id)
if user.status == "kicked":
await update.reply_text("🤭 Sorry Dude, You are **B A N N E D 🤣🤣🤣**")
await update.reply_text("🤭 Kechirasiz , Siz **B A N N E D** bo'ldingiz ")
return
except UserNotParticipant:
#await update.reply_text(f"Join @{update_channel} To Use Me")
await update.reply_text(
text="**Join My Updates Channel to use ME 😎 🤭**",
text="**Siz mening kanalimga a'zo bo'ling 😎 🤭**",
reply_markup=InlineKeyboardMarkup([
[ InlineKeyboardButton(text="Join My Updates Channel", url=f"https://t.me/{update_channel}")]
[ InlineKeyboardButton(text="Kanal ✔", url=f"https://t.me/{update_channel}")]
])
)
return
Expand Down
74 changes: 35 additions & 39 deletions translation.py
Original file line number Diff line number Diff line change
@@ -1,63 +1,59 @@
class Translation(object):
START_TEXT = """Hello,
This is a Telegram URL Upload Bot!
START_TEXT = """Siz /help buyrug'i yordamida mendan qanday foydalanishni bilib olishingiz mumkin

<b>Please send me any direct download URL Link, i can upload to telegram as File/Video</b>
Siz /upgrade buyrug'i yordamida yuqori funktsiyalarga ega bo'lishingiz mumkin

/help for more details..

Support Group : @InFoTelGroup
© @SpEcHlDe , @TGBotsZ & @CWProjects"""
RENAME_403_ERR = "Sorry. You are not permitted to rename this file."
ABS_TEXT = " Please don't be selfish."
UPGRADE_TEXT = "<b>👉 Create own Clone Bot.. </b> /help for Details"
FORMAT_SELECTION = "Select the desired format: <a href='{}'>file size might be approximate</a> \nIf you want to set custom thumbnail, send photo before or quickly after tapping on any of the below buttons.\nYou can use /deletethumbnail to delete the auto-generated thumbnail."
SET_CUSTOM_USERNAME_PASSWORD = """If you want to download premium videos, provide in the following format:
By: @All_Url_DownloaderBot ."""
RENAME_403_ERR = "Kechirasiz. Faylni nomlash uchun sizda etarli ruxsat yo'q"
ABS_TEXT = " Iltimos, xudbinlik qilmang"
UPGRADE_TEXT = "@All_Url_DownloaderBot <a href='https://t.me/SalomovAsliddin'> To'lovlar </a> \nTo'lovni to'lagandan so'ng, siz to'lovning skrinshotini @SalomovAsliddin_2oo4 yoki @SalomovAsliddinga yuborishingiz kerak."
FORMAT_SELECTION = "Istagan formatingizni tanlang: <a href='{}'>fayl hajmi </a> \nAgar siz maxsus eskiz o'rnatmoqchi bo'lsangiz, quyidagi tugmalardan birini bosishdan oldin yoki keyin rasm yuboring."
SET_CUSTOM_USERNAME_PASSWORD = """File formatini tanlang:
URL | filename | username | password"""
NOYES_URL = "@robot URL detected. Please use https://shrtz.me/PtsVnf6 and get me a fast URL so that I can upload to Telegram, without me slowing down for other users."
DOWNLOAD_START = "trying to download"
UPLOAD_START = "trying to upload"
RCHD_BOT_API_LIMIT = "size greater than maximum allowed size (50MB). Neverthless, trying to upload."
RCHD_TG_API_LIMIT = "Downloaded in {} seconds.\nDetected File Size: {}\nSorry. But, I cannot upload files greater than 1.5GB due to Telegram API limitations."
AFTER_SUCCESSFUL_UPLOAD_MSG = "Please rate me if you find me useful. Join : @TGBotsZ"
AFTER_SUCCESSFUL_UPLOAD_MSG_WITH_TS = "Downloaded in {} seconds. \nJoin : @TGBotsZ \nUploaded in {} seconds."
NOT_AUTH_USER_TEXT = "Please /upgrade your subscription."
NOT_AUTH_USER_TEXT_FILE_SIZE = "Detected File Size: {}. Free Users can only upload: {}\nPlease /upgrade your subscription.\nIf you think this is a bug, please contact <a href='https://telegram.dog/ThankTelegram'>@SpEcHlDe</a>"
NOYES_URL = "@All_Url_DownloaderBot URL manzili aniqlandi. Iltimos, xizmatni buzmang!"
DOWNLOAD_START = "Server yuklanmoqda..."
UPLOAD_START = "Telegram yuklanmoqda..."
RCHD_BOT_API_LIMIT = "Ruxsat etilgan maksimal hajmdan kattaroq (50MB) Biroq, Biz uni o'rnatishga harakat qilyapmiz."
RCHD_TG_API_LIMIT = "Serverga {} sekunda yuklandi. \nFile hajmi: {}\nUzur. Ammo Telegramga max 1.5 GB fayl yuklash imkoni mavjud."
AFTER_SUCCESSFUL_UPLOAD_MSG = "Iltimos, menga foydali deb baho bering. https://t.me/SalomovAsliddin "
AFTER_SUCCESSFUL_UPLOAD_MSG_WITH_TS = "Server yuklash {} sekundda. \nA'zo bo'ling : @SalomovAsliddin \nTelegramga yuklash {} sekund."
NOT_AUTH_USER_TEXT = "Iltimos, /upgrade buyrug'i yordamida obunangizni yangilang."
NOT_AUTH_USER_TEXT_FILE_SIZE = "Aniqlangan fayl hajmi: {}. Bepul foydalanuvchilar faqat yuklashi mumkin: {} \n Iltimos, /upgrade buyrug'i yordamida obunani yangilang. \n Botda xato topsangiz, bu erda men bilan bog'lanishingiz mumkin <a href='https://uzfilms.rf.gd'> @SalomovAsliddin </a>"
SAVED_CUSTOM_THUMB_NAIL = "Custom video / file thumbnail saved. This image will be used in the video / file."
DEL_ETED_CUSTOM_THUMB_NAIL = "✅ Custom thumbnail cleared succesfully."
FF_MPEG_DEL_ETED_CUSTOM_MEDIA = "✅ Media cleared succesfully."
SAVED_RECVD_DOC_FILE = "Document Downloaded Successfully."
DEL_ETED_CUSTOM_THUMB_NAIL = "✅ Maxsus eskiz muvaffaqiyatli o'chirildi."
FF_MPEG_DEL_ETED_CUSTOM_MEDIA = "✅ Media tozalandi"
SAVED_RECVD_DOC_FILE = "Hujjat muvaffaqiyatli yuklandi."
CUSTOM_CAPTION_UL_FILE = " "
NO_CUSTOM_THUMB_NAIL_FOUND = "No Custom ThumbNail found."
NO_VOID_FORMAT_FOUND = "ERROR...\n<b>YouTubeDL</b> said: {}"
NO_CUSTOM_THUMB_NAIL_FOUND = "Maxsus eskiz topilmadi."
NO_VOID_FORMAT_FOUND = "ERROR...\n<b>Havola berkitilgan</b>: {}"
USER_ADDED_TO_DB = "User <a href='tg://user?id={}'>{}</a> added to {} till {}."
CURENT_PLAN_DETAILS = """Current plan details
CURENT_PLAN_DETAILS = """Loyihamiz
--------
Telegram ID: <code>{}</code>
Plan name: Free Cloned User
Expires on: 31/12/2020"""
HELP_USER = """Hai am URL Uploader bot..
Loyiha nomi: Tezkor Bot
Expires on: 01/10/2021"""
HELP_USER = """Salom sizga yordam berishga tayyormiz:

1. Send url (Link|New Name with Extension).
2. Send Custom Thumbnail (Optional).
3. Select the button.
1. File/video url ni yuboring...
2. Tugmalardan foydalanib birini tanlang...
3. Tugmalar:
SVideo - Give File as video with Screenshots
DFile - Give File with Screenshots
Video - Give File as video without Screenshots
DFile - Give File without Screenshots

<b>👉 Create own Clone Bot :</b> 👉 <a href="https://youtu.be/QkAkSLBgoYw">Diploy</a>


--------
Send /me to know current plan details

Support Group : @InFoTelGroup
© @TGBotsZ"""
Support Group : @SalomovAsliddin_2004
By: @SalomovAsliddin"""
REPLY_TO_DOC_GET_LINK = "Reply to a Telegram media to get High Speed Direct Download Link"
REPLY_TO_DOC_FOR_C2V = "Reply to a Telegram media to convert"
REPLY_TO_DOC_FOR_SCSS = "Reply to a Telegram media to get screenshots"
REPLY_TO_DOC_FOR_RENAME_FILE = "Reply to a Telegram media to /rename with custom thumbnail support"
AFTER_GET_DL_LINK = "Direct Link <a href='{}'>Generated</a> valid for {} days.\n© @AnyDLBot"
AFTER_GET_DL_LINK = "Direct Link <a href='{}'>Generated</a> valid for {} days.\n @All_Url_DownloaderBot"
FF_MPEG_RO_BOT_RE_SURRECT_ED = """Syntax: /trim HH:MM:SS [HH:MM:SS]"""
FF_MPEG_RO_BOT_STEP_TWO_TO_ONE = "First send /downloadmedia to any media so that it can be downloaded to my local. \nSend /storageinfo to know the media, that is currently downloaded."
FF_MPEG_RO_BOT_STOR_AGE_INFO = "Video Duration: {}\nSend /clearffmpegmedia to delete this media, from my storage.\nSend /trim HH:MM:SS [HH:MM:SS] to cu[l]t a small photo / video, from the above media."
Expand All @@ -68,15 +64,15 @@ class Translation(object):
ERR_ONLY_TWO_MEDIA_IN_ALBUM = "Media Album should contain only two photos. Please re-send the media album, and then try again, or send only two photos in an album."
INVALID_UPLOAD_BOT_URL_FORMAT = "URL format is incorrect. make sure your url starts with either http:// or https://. You can set custom file name using the format link | file_name.extension"
ABUSIVE_USERS = "You are not allowed to use this bot. If you think this is a mistake, please check /me to remove this restriction."
FF_MPEG_RO_BOT_AD_VER_TISE_MENT = "https://telegram.dog/FFMpegRoBot"
FF_MPEG_RO_BOT_AD_VER_TISE_MENT = "@SalomovAsliddin"
EXTRACT_ZIP_INTRO_ONE = "Send a compressed file first, Then reply /unzip command to the file."
EXTRACT_ZIP_INTRO_THREE = "Analyzing received file. ⚠️ This might take some time. Please be patient. "
UNZIP_SUPPORTED_EXTENSIONS = ("zip", "rar")
EXTRACT_ZIP_ERRS_OCCURED = "Sorry. Errors occurred while processing compressed file. Please check everything again twice, and if the issue persists, report this to <a href='https://telegram.dog/ThankTelegram'>@SpEcHlDe</a>"
EXTRACT_ZIP_STEP_TWO = """Select file_name to upload from the below options.
You can use /rename command after receiving file to rename it with custom thumbnail support."""
CANCEL_STR = "Process Cancelled"
ZIP_UPLOADED_STR = "Uploaded {} files in {} seconds"
ZIP_UPLOADED_STR = "Server yuklangan {} file {} sekunt."
FREE_USER_LIMIT_Q_SZE = """Cannot Process.
Free users only 1 request per 30 minutes.
/upgrade or Try 1800 seconds later."""
Expand Down