Skip to content

Commit

Permalink
fix:imports in files
Browse files Browse the repository at this point in the history
  • Loading branch information
kalanakt committed Jan 28, 2024
1 parent ec5588c commit dc6378a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 25 deletions.
13 changes: 6 additions & 7 deletions plugins/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
import shutil
import asyncio
from datetime import datetime

from Uploader.functions.display_progress import humanbytes, progress_for_pyrogram
from Uploader.functions.ran_text import random_char
from Uploader.script import Translation
from Uploader.utitles import Mdata01, Mdata02, Mdata03
from config import Config
from plugins.functions.display_progress import humanbytes, progress_for_pyrogram
from plugins.functions.ran_text import random_char
from plugins.script import Translation
from plugins.utitles import Mdata01, Mdata02, Mdata03

# Set up logging configuration
logging.basicConfig(
Expand Down Expand Up @@ -65,7 +64,7 @@ async def youtube_dl_call_back(_bot, update):
elif entity.type == "url":
o = entity.offset
length = entity.length
youtube_dl_url = youtube_dl_url[o : o + length]
youtube_dl_url = youtube_dl_url[o: o + length]

# Cleaning up inputs
youtube_dl_url, custom_file_name, youtube_dl_username, youtube_dl_password = (
Expand All @@ -87,7 +86,7 @@ async def youtube_dl_call_back(_bot, update):
elif entity.type == "url":
o = entity.offset
length = entity.length
youtube_dl_url = youtube_dl_url[o : o + length]
youtube_dl_url = youtube_dl_url[o: o + length]

await update.message.edit_caption(
caption=Translation.DOWNLOAD_START.format(custom_file_name)
Expand Down
6 changes: 3 additions & 3 deletions plugins/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import logging
from pyrogram import Client
from Uploader.dl_button import ddl_call_back
from Uploader.button import youtube_dl_call_back
from Uploader.script import Translation
from plugins.dl_button import ddl_call_back
from plugins.button import youtube_dl_call_back
from plugins.script import Translation

# Set up logging configuration
logging.basicConfig(
Expand Down
2 changes: 1 addition & 1 deletion plugins/commands.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pyrogram import Client, filters
from pyrogram.types import Message
from Uploader.script import Translation
from plugins.script import Translation


@Client.on_message(
Expand Down
6 changes: 3 additions & 3 deletions plugins/dl_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import os
import time
import aiohttp
from Uploader.functions.display_progress import (
from plugins.functions.display_progress import (
progress_for_pyrogram,
humanbytes,
TimeFormatter,
)
from Uploader.script import Translation
from Uploader.utitles import Mdata01, Mdata02, Mdata03
from plugins.script import Translation
from plugins.utitles import Mdata01, Mdata02, Mdata03
from config import Config

logging.basicConfig(
Expand Down
10 changes: 5 additions & 5 deletions plugins/echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton

from config import Config
from Uploader.script import Translation
from Uploader.functions.ran_text import random_char
from Uploader.functions.display_progress import humanbytes
from plugins.script import Translation
from plugins.functions.ran_text import random_char
from plugins.functions.display_progress import humanbytes

logging.basicConfig(
level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
Expand Down Expand Up @@ -58,7 +58,7 @@ async def echo(bot, update):
elif entity.type == "url":
o = entity.offset
length = entity.length
url = url[o : o + length]
url = url[o: o + length]
if url is not None:
url = url.strip()
if file_name is not None:
Expand All @@ -77,7 +77,7 @@ async def echo(bot, update):
elif entity.type == "url":
o = entity.offset
length = entity.length
url = url[o : o + length]
url = url[o: o + length]
if Config.HTTP_PROXY != "":
command_to_exec = [
"yt-dlp",
Expand Down
6 changes: 3 additions & 3 deletions plugins/functions/help_uploadbot.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import logging
import os
import time
import requests
import logging

from Uploader.functions.display_progress import humanbytes
from plugins.functions.display_progress import humanbytes

logging.basicConfig(
level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
Expand All @@ -21,7 +21,7 @@ def DetectFileSize(url):
Returns:
int: Size of the file in bytes.
"""
r = requests.head(url, allow_redirects=True)
r = requests.head(url, allow_redirects=True, timeout=60)
return int(r.headers.get("content-length", 0))


Expand Down
4 changes: 1 addition & 3 deletions plugins/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
from pyrogram import Client, filters

from config import Config

from Uploader.functions.help_ytdl import get_file_extension_from_url, get_resolution

from plugins.functions.help_ytdl import get_file_extension_from_url, get_resolution
YTDL_REGEX = r"^((?:https?:)?\/\/)"


Expand Down

1 comment on commit dc6378a

@vercel
Copy link

@vercel vercel bot commented on dc6378a Jan 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

all-url-uploader – ./

all-url-uploader-netronk.vercel.app
all-url-uploader-git-main-netronk.vercel.app
urluploader.vercel.app

Please sign in to comment.