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

NZ #1

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open

NZ #1

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b61964f
Warning
LazyDeveloperr Jan 7, 2023
bc43679
Update README.md
LazyDeveloperr Jan 7, 2023
8d00e64
Update requirements.txt
LazyDeveloperr Jan 7, 2023
86ea36c
Update README.md
LazyDeveloperr Jan 8, 2023
2a54d30
Add files via upload
LazyDeveloperr Jan 8, 2023
eabb87f
Delete README.md
LazyDeveloperr Jan 8, 2023
35ee268
Add files via upload
LazyDeveloperr Jan 8, 2023
832c4b1
Add files via upload
LazyDeveloperr Jan 8, 2023
166fe79
updated
LazyDeveloperr Jan 8, 2023
bdf2b46
Add files via upload
LazyDeveloperr Jan 8, 2023
7de65e4
Add files via upload
LazyDeveloperr Jan 8, 2023
ba852d4
Update help_text.py
LazyDeveloperr Jan 8, 2023
cf69090
Add files via upload
LazyDeveloperr Jan 8, 2023
a30c4ad
Update help_text.py
LazyDeveloperr Jan 8, 2023
81f6b15
Add files via upload
LazyDeveloperr Jan 8, 2023
45f9248
Update translation.py
LazyDeveloperr Jan 8, 2023
82bb244
Create README.md
LazyDeveloperr Jan 10, 2023
a33ec1c
Update README.md
LazyDeveloperr Jan 11, 2023
2fae3df
Update README.md
LazyDeveloperr Jan 12, 2023
d24bf17
Update README.md
LazyDeveloperr Jan 12, 2023
1d72f45
Update README.md
LazyDeveloperr Jan 12, 2023
7b7e507
Update README.md
LazyDeveloperr Jan 12, 2023
af3f8be
Update README.md
LazyDeveloperr Jan 12, 2023
439a588
`README-updated`
LazyDeveloperr Jan 12, 2023
66d7a5d
Update README.md
LazyDeveloperr Jan 12, 2023
2d4d684
Update README.md
LazyDeveloperr Jan 12, 2023
b7b9ead
Update requirements.txt
LazyDeveloperr Nov 25, 2024
4fdb1d6
Update requirements.txt
LazyDeveloperr Nov 26, 2024
2a7a785
Update requirements.txt
LazyDeveloperr Nov 26, 2024
808eec9
Update youtube_dl_echo.py
LazyDeveloperr Nov 26, 2024
3688821
Update youtube_dl_echo.py
LazyDeveloperr Nov 26, 2024
026b988
Update youtube_dl_echo.py
LazyDeveloperr Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 87 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,87 @@
## X-URL-Uploader (Bot)
---

Telegram RoBot to Upload Links.

**Features**:

👉 Only Auth Users (AUTH_USERS) Can Use The Bot

👉 Upload [YTDL Supported Links](https://ytdl-org.github.io/youtube-dl/supportedsites.html) to Telegram.

👉 Upload HTTP/HTTPS as File/Video to Telegram.

👉 Upload Mediafire, Zippyshare, Hxfile, Anonfiles, Antfiles URL using LK21

**For Devs**:

👉 [X-URL-Uploader-dev](https://github.com/X-Gorn/X-URL-Uploader/tree/dev)

**Deploying on VPS**:

[![YouTube Video Views](https://img.shields.io/youtube/views/SKrEaAavhMs?logoColor=black)](https://youtu.be/SKrEaAavhMs)

## Telegram Support:

[![Channel](https://img.shields.io/badge/TG-Channel-30302f?style=flat&logo=telegram)](https://t.me/xTeamBots)
[![Group](https://img.shields.io/badge/TG-Group-30302f?style=flat&logo=telegram)](https://t.me/xTeamBotsSupport)

## Credits, and Thanks to:

* [@TGExplore](https://t.me/ViruZs) for his [TG-URL-Uploader](https://github.com/TGExplore/TG-URL-Uploader)
* [@SpEcHlDe](https://t.me/ThankTelegram) for his [AnyDLBot](https://telegram.dog/AnyDLBot)
* [Dan Tès](https://t.me/haskell) for his [Pyrogram Library](https://github.com/pyrogram/pyrogram)
* [Yoily](https://t.me/YoilyL) for his [UploaditBot](https://telegram.dog/UploaditBot)

#### LICENSE
- GPLv3
<img src="https://telegra.ph/file/efdf5689646da738eb787.jpg" alt="logo" target="/blank">

<h1 align="center">
<b><a href="https://telegram.me/LazyDeveloper" target="/blank">BEWAFA Angel-Priya BOT</a></>
</h1>

<p align="center">🤍 Thanks for Being Here 🤍</p>


## * MiND iT....
👉 Only Auth Users (AUTH_USERS) Can Use The Bot

👉 Upload [YTDL Supported Links](https://ytdl-org.github.io/youtube-dl/supportedsites.html) to Telegram.

👉 Upload HTTP/HTTPS as File/Video to Telegram.

👉 Upload Mediafire, Zippyshare, Hxfile, Anonfiles, Antfiles URL using LK21


### ⚡️ Configs

* `TG_BOT_TOKEN` - Create a New BOT to Get bot token. follow link https://telegram.me/BotFather

* `API_ID` - From my.telegram.org

* `API_HASH` - From my.telegram.org

* `AUTH_USERS` - Your Telegram + Your your paid users id.
- NOTE - Only `AUTH_USERS` can use this BOT. SO you must have to give your id.

* `LAZY_DEVELOPER` - Give ADMIN id in this field.

* `WEBHOOK` - Give value `LazyDev`.

* `DEF_THUMB_NAIL_VID_S` - default thumbnail to be used in the videos. Incase, youtube-dl is unable to find a thumbnail.

* `LOG_CHANNEL` - To keep an eye on the users. If they do upload something illegal.

### 📶 DEPLOYEMENT SUPPORT

<details><summary>🔥 Deploy To Koyeb 🔥</summary>
<p>
<br>
<a target="/blank" href="https://app.koyeb.com/deploy?type=git&repository=github.com/LazyDeveloperr/Angel-Priya-Url-Uploader-bot&branch=master&name=LazyMissPerfectGOT" >
<img src="https://www.koyeb.com/static/images/deploy/button.svg" alt="Deploy">
</a>
</p>
</details>
<details><summary>🧡Deploy To Heroku🧡</summary>
<p>
<br>
<a href="https://heroku.com/deploy?template=https://github.com/LazyDeveloperr/Angel-Priya-Url-Uploader-bot">
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy">
</a>
</p>
</details>


### 🔗 important_Links
- [❣️ Join Youtube](https://www.youtube.com/channel/UCY-iDra0x2hdd9PdHKcZkRw)


#### 🧡 Respecting Lazy... 🧡
- [🔥 LazyDeveloperr](https://github.com/LazyDeveloperr)
- [🔥 Instagram](https://www.instagram.com/LazyDeveloperrr)
- [🔥 Pyrogram](https://github.com/pyrogram/pyrogram)


**Features**:
👉 Upload [yt-dlp Supported Links](https://ytdl-org.github.io/youtube-dl/supportedsites.html) to Telegram.

🧡 Upload HTTP/HTTPS as File/Video to Telegram.

🧡 Upload zee5, sony.live, voot and much more.

🧡 Permanent thumbnail Support.

🧡 Broadcast message.

## Credits, and Thanks to
* [@LazyDeveloper](https://telegram.me/mRiderDM) LazyDeveloper
* [@SpEcHlDe](https://t.me/ThankTelegram) for his [AnyDLBot](https://telegram.dog/AnyDLBot)
* [Dan Tès](https://t.me/haskell) for his [Pyrogram Library](https://github.com/pyrogram/pyrogram)
* [Yoily](https://t.me/YoilyL) for his [UploaditBot](https://telegram.dog/UploaditBot)

#### LICENSE
- GPLv3
16 changes: 10 additions & 6 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
"name": "X-URL-Uploader",
"description": "Telegram Bot to Upload URLs to Telegram as File and Video.",
"keywords": [
"telegram",
"best",
"youtube",
"LazyDeveloper",
"LazyPrincess",
"url-uploader-src",
"downloader",
"open",
"source",
"multi",
"purpose",
"ffmpeg",
"remote",
"uploader"
],
"remote"
],
"success_url": "https://t.me/LazyDeveloper",
"website": "https://github.com/LazyDeveloperr",
"repository": "https://github.com/LazyDeveloperr/test100",
Expand Down Expand Up @@ -51,6 +50,11 @@
"description": "proxy for accessing youtube-dl in GeoRestricted Areas. Get your own proxy from https://github.com/rg3/youtube-dl/issues/1091#issuecomment-230163061",
"value": "",
"required": false
},
"LAZY_DEVELOPER": {
"description": "Give ADMIN id in this field ",
"value": "",
"required": true
}
},
"addons": [
Expand Down
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Thank you LazyDeveloper for helping me in this journey !
#Thank you LazyDeveloper for helping developers in this journey !
#Must Subscribe On YouTube @LazyDeveloperr

from flask import Flask
Expand Down
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) Thank you @LazyDeveloperr

# the logging things
import logging
Expand Down Expand Up @@ -28,11 +28,11 @@
root="plugins"
)
app = pyrogram.Client(
"X-URL-Uploader",
"BewafaAngelPriya",
bot_token=Config.TG_BOT_TOKEN,
api_id=Config.APP_ID,
api_hash=Config.API_HASH,
plugins=plugins
)
Config.AUTH_USERS.add(958850850)
Config.AUTH_USERS.add(1484670284)
app.run()
32 changes: 32 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os

class Config(object):
# get a token from @BotFather
TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN", "")
# The Telegram API things
APP_ID = int(os.environ.get("APP_ID", 12345))
API_HASH = os.environ.get("API_HASH")
# Get these values from my.telegram.org
# Array to store users who are authorized to use the bot
AUTH_USERS = set(int(x) for x in os.environ.get("AUTH_USERS", "").split())
# the download location, where the HTTP Server runs
DOWNLOAD_LOCATION = "./DOWNLOADS"
# Telegram maximum file upload size
MAX_FILE_SIZE = 50000000
TG_MAX_FILE_SIZE = 2097152000
FREE_USER_MAX_FILE_SIZE = 50000000
# chunk size that should be used with requests
CHUNK_SIZE = int(os.environ.get("CHUNK_SIZE", 128))
# default thumbnail to be used in the videos
DEF_THUMB_NAIL_VID_S = os.environ.get("DEF_THUMB_NAIL_VID_S", "https://telegra.ph/file/1efd13f55ef33d64aa2c8.jpg")
# proxy for accessing youtube-dl in GeoRestricted Areas
# Get your own proxy from https://github.com/rg3/youtube-dl/issues/1091#issuecomment-230163061
HTTP_PROXY = os.environ.get("HTTP_PROXY", "")
# maximum message length in Telegram
MAX_MESSAGE_LENGTH = 40960
# set timeout for subprocess
PROCESS_MAX_TIMEOUT = 3600
# watermark file
DEF_WATER_MARK_FILE = ""
#Admin id is stored in
LAZY_DEVELOPER = set(int(x) for x in os.environ.get("LAZY_ADMIN", "").split())
6 changes: 3 additions & 3 deletions helper_funcs/display_progress.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) Thank you LazyDeveloperr for helping us in this journey.

# the logging things
import logging
Expand Down Expand Up @@ -43,8 +43,8 @@ async def progress_for_pyrogram(
estimated_total_time = TimeFormatter(milliseconds=estimated_total_time)

progress = "[{0}{1}] \nP: {2}%\n".format(
''.join(["" for i in range(math.floor(percentage / 5))]),
''.join(["" for i in range(20 - math.floor(percentage / 5))]),
''.join(["♥️" for i in range(math.floor(percentage / 5))]),
''.join(["_" for i in range(20 - math.floor(percentage / 5))]),
round(percentage, 2))

tmp = progress + "{0} of {1}\nSpeed: {2}/s\nETA: {3}\n".format(
Expand Down
2 changes: 1 addition & 1 deletion helper_funcs/help_Nekmo_ffmpeg.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) Thank you LazyDeveloperr for helping us in this journey.

# the logging things
import logging
Expand Down
4 changes: 3 additions & 1 deletion helper_funcs/help_uploadbot.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) Shrimadhav U K
# (c) Thank you LazyDeveloperr for helping us in this journey.

# the logging things
import logging
import time
from helper_funcs.display_progress import humanbytes
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
Expand Down
5 changes: 2 additions & 3 deletions plugins/cb_buttons.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) Shrimadhav U K
# (c) Thank you LazyDeveloperr for helping us in this journey.

# the logging things
import logging
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logging.basicConfig(level=logging.DEBUG,format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)

import json
Expand Down
2 changes: 1 addition & 1 deletion plugins/custom_thumbnail.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) Thank you LazyDeveloperr for helping us in this journey.

# the logging things
import logging
Expand Down
16 changes: 8 additions & 8 deletions plugins/dl_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,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
URL: {}
File Size: {}""".format(url, humanbytes(total_length))
text="""Preparing your request...
⚡️ 𝗨𝗥𝗟: <a href='{}'>❝ 𝐋𝐚𝐳𝐲 𝐔𝐫𝐥 ❞</a>
🎲 𝗙𝗶𝗹𝗲 𝗦𝗶𝘇𝗲: {}""".format(url, humanbytes(total_length))
)
with open(file_name, "wb") as f_handle:
while True:
Expand All @@ -303,11 +303,11 @@ async def download_coroutine(bot, session, url, file_name, chat_id, message_id,
(total_length - downloaded) / speed) * 1000
estimated_total_time = elapsed_time + time_to_completion
try:
current_message = """**Download Status**
URL: {}
File Size: {}
Downloaded: {}
ETA: {}""".format(
current_message = """\n\n** ⭑┗━┫⦀⦙ Download Status ⦙⦀┣━┛⭑**
⚡️ 𝗨𝗥𝗟: <a href='{}'>❝ 𝐋𝐚𝐳𝐲 𝐔𝐫𝐥 ❞</a>
🎲 𝗙𝗶𝗹𝗲 𝗦𝗶𝘇𝗲: {}
⏳ 𝗗𝗼𝘄𝗻𝗹𝗼𝗮𝗱𝗲𝗱: {}
🧭 ЄTА: {}""".format(
url,
humanbytes(total_length),
humanbytes(downloaded),
Expand Down
47 changes: 41 additions & 6 deletions plugins/help_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,56 @@ async def help_user(bot, update):

@pyrogram.Client.on_message(pyrogram.filters.command(["start"]))
async def start(bot, update):
if update.from_user.id in Config.AUTH_USERS:
if update.from_user.id in (Config.AUTH_USERS & Config.LAZY_DEVELOPER):
# logger.info(update)
await bot.send_message(
chat_id=update.chat.id,
text=Translation.LAZY_DEVELOPER_TEXT.format(update.from_user.first_name),
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("⚡️𝔖𝔲𝔭𝔭𝔬𝔯𝔱", url="https://t.me/LazyPrincessSupport"),
InlineKeyboardButton("✪ YT ✪", url="https://youtube.com/@LazyDeveloperr"),
InlineKeyboardButton("⚡️ U𝖕𝖉𝖆𝖙e", url="https://t.me/LazyDeveloper"),
],
[InlineKeyboardButton("⭑💢 𝚂 𝙾 𝙲 𝚒 𝙰 𝙻 💢⭑", url="https://instagram.com/LazyDeveloper__")],
[InlineKeyboardButton("🦋 ⭑┗━━┫⦀⦙ O W N E R ⦙⦀┣━━┛⭑ 🦋", url="https://t.me/LazyDeveloperr")],
]
),
reply_to_message_id=update.message_id
)
elif update.from_user.id in Config.AUTH_USERS:
# logger.info(update)
await bot.send_message(
chat_id=update.chat.id,
text=Translation.START_TEXT.format(update.from_user.first_name),
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"Source", url="https://github.com/LazyDeveloper"
),
InlineKeyboardButton("Project Channel", url="https://t.me/LazyDeveloperr"),
InlineKeyboardButton("⚡️𝔖𝔲𝔭𝔭𝔬𝔯𝔱", url="https://t.me/LazyPrincessSupport"),
InlineKeyboardButton("✪ YT ✪", url="https://youtube.com/@LazyDeveloperr"),
InlineKeyboardButton("⚡️ U𝖕𝖉𝖆𝖙e", url="https://t.me/LazyDeveloper"),
],
[InlineKeyboardButton("⭑💢 𝚂 𝙾 𝙲 𝚒 𝙰 𝙻 💢⭑", url="https://instagram.com/LazyDeveloper__")],
[InlineKeyboardButton("🦋 ⭑┗━━┫⦀⦙ O W N E R ⦙⦀┣━━┛⭑ 🦋", url="https://t.me/LazyDeveloperr")],
]
),
reply_to_message_id=update.message_id
)
else:
# logger.info(update) ==
await bot.send_message(
chat_id=update.chat.id,
text=Translation.LAZY_START_TEXT.format(update.from_user.first_name),
reply_markup=InlineKeyboardMarkup(
[
[InlineKeyboardButton("🦋 ⭑┗━━┫⦀⦙ O W N E R ⦙⦀┣━━┛⭑ 🦋", url="https://t.me/LazyDeveloperr")],
[
InlineKeyboardButton("▍║▍▏║ UPDATE ║▍▏║▍", url="https://t.me/LazyPrincessSupport"),
],
[InlineKeyboardButton("Author", url="https://t.me/mRiderDM")],
[InlineKeyboardButton("⭑💢 𝚂 𝙾 𝙲 𝚒 𝙰 𝙻 💢⭑", url="https://instagram.com/LazyDeveloper__")],
]
),
reply_to_message_id=update.message_id
)

Loading