I have a bot that I have made, this bot says whether the m3u file is active or passive. It works normally in python on my phone, but when I upload it to the site, it says all url addresses are passive, but the url is actually active. How can I overcome this problem, the code is below
import telepot
import webbrowser
import requests
from flask import Flask, request
from telegram.ext import Updater, CommandHandler
import logging
from telegram import Update
from telegram import Bot
import urllib3
proxy_url = "http://8.209.114.72:3129"
telepot.api._pools = {
'default': urllib3.ProxyManager(
proxy_url=proxy_url,
num_pools=3,
maxsize=10,
retries=False,
timeout=30
)
}
secret = "#######"
bot_token = "#######"
bot = Bot(bot_token)
app = Flask(__name__)
# Kameraları listeleme fonksiyonu eklenebilir
def start_handler(update: Update, context):
message = "Bot devrede!"
chat_id = update.effective_chat.id
bot.send_message(chat_id=chat_id, text=message)
def yan_handler(update, context):
url = ' '.join(context.args)
if not url.startswith("http://") and not url.startswith("https://"):
url = "https://" + url
try:
response = requests.get(url)
if response.status_code == 200:
message = f"✅ Bağlantı Başarılı!\n\nURL: {url}"
# Stream URL'i ise expired_date bilgisini gösterelim
if "stream" in url:
stream_info = get_stream_info(url)
if stream_info is not None:
message += f"\nBitiş tarihi: {stream_info['expired_date']}"
context.bot.send_message(chat_id=update.effective_chat.id, text=message)
else:
context.bot.send_message(chat_id=update.effective_chat.id, text="URL pasif!")
except requests.exceptions.RequestException as e:
context.bot.send_message(chat_id=update.effective_chat.id, text="