Hello! I want to create a Telegram Bot, which can convert YouTube link to mp3. I want to do it with aiogram library, but I saw only these bots with telebot library. Could somebody help me?I wrote something like this, but I got nothing
async def convert_audio(message: types.Message): video_url = message.text video_id = video_url.split('=')[1]audio_url = f'https://www.yt-download.org/api/button/mp3/{video_id}'urllib.request.urlretrieve(audio_url, f'{video_id}.mp3')with open(f'{video_id}.mp3', 'rb') as audio_file: await bot.send_audio(message.chat.id, audio_file)os.remove(f'{video_id}.mp3')