mirror of
https://github.com/tgbot-collection/ytdlbot.git
synced 2024-11-10 17:25:59 +08:00
remove sentry
This commit is contained in:
parent
02341a9865
commit
0b6efaae73
4 changed files with 2 additions and 17 deletions
|
@ -22,4 +22,3 @@ ffpb==0.4.1
|
|||
youtube-search-python==1.6.6
|
||||
token-bucket==0.3.0
|
||||
coloredlogs==15.0.1
|
||||
sentry-sdk==1.29.2
|
||||
|
|
|
@ -63,5 +63,4 @@ TOKEN_PRICE = os.getenv("BUY_UNIT", 20) # one USD=20 credits
|
|||
|
||||
RATE_LIMIT = os.getenv("RATE_LIMIT", 20)
|
||||
|
||||
DSN = os.getenv("DSN")
|
||||
SS_YOUTUBE = os.getenv("SS_YOUTUBE", "https://ytdlbot.dmesg.app?token=123456")
|
||||
|
|
|
@ -26,21 +26,18 @@ import filetype
|
|||
import psutil
|
||||
import pyrogram.errors
|
||||
import requests
|
||||
import sentry_sdk
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from celery import Celery
|
||||
from celery.worker.control import Panel
|
||||
from pyrogram import Client, idle, types
|
||||
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message
|
||||
from requests_toolbelt import MultipartEncoder, MultipartEncoderMonitor
|
||||
from sentry_sdk.integrations.celery import CeleryIntegration
|
||||
|
||||
from channel import Channel
|
||||
from client_init import create_app
|
||||
from config import (
|
||||
ARCHIVE_ID,
|
||||
BROKER,
|
||||
DSN,
|
||||
ENABLE_CELERY,
|
||||
ENABLE_QUEUE,
|
||||
ENABLE_VIP,
|
||||
|
@ -74,8 +71,6 @@ channel = Channel()
|
|||
|
||||
session = "ytdl-celery"
|
||||
celery_client = create_app(session)
|
||||
if DSN:
|
||||
sentry_sdk.init(DSN, integrations=[CeleryIntegration()])
|
||||
|
||||
|
||||
def get_messages(chat_id, message_id):
|
||||
|
|
|
@ -20,7 +20,6 @@ from io import BytesIO
|
|||
|
||||
import pyrogram.errors
|
||||
import requests
|
||||
import sentry_sdk
|
||||
import yt_dlp
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from pyrogram import Client, filters, types
|
||||
|
@ -34,7 +33,6 @@ from channel import Channel
|
|||
from client_init import create_app
|
||||
from config import (
|
||||
AUTHORIZED_USER,
|
||||
DSN,
|
||||
ENABLE_CELERY,
|
||||
ENABLE_FFMPEG,
|
||||
ENABLE_VIP,
|
||||
|
@ -66,8 +64,6 @@ app = create_app(session)
|
|||
logging.info("Authorized users are %s", AUTHORIZED_USER)
|
||||
redis = Redis()
|
||||
channel = Channel()
|
||||
if DSN:
|
||||
sentry_sdk.init(dsn=DSN)
|
||||
|
||||
|
||||
def private_use(func):
|
||||
|
@ -355,12 +351,8 @@ def link_checker(url: str) -> str:
|
|||
return ""
|
||||
ytdl = yt_dlp.YoutubeDL()
|
||||
|
||||
if (
|
||||
not PLAYLIST_SUPPORT
|
||||
and (
|
||||
re.findall(r"^https://www\.youtube\.com/channel/", Channel.extract_canonical_link(url))
|
||||
or "list" in url
|
||||
)
|
||||
if not PLAYLIST_SUPPORT and (
|
||||
re.findall(r"^https://www\.youtube\.com/channel/", Channel.extract_canonical_link(url)) or "list" in url
|
||||
):
|
||||
return "Playlist or channel links are disabled."
|
||||
|
||||
|
|
Loading…
Reference in a new issue