yteva library for downloading audio and videos from YouTube and details about them.
Project description
YTeva
YTeva is a Python library that fetches and downloads audio files using Pyrogram.
Installation
pip install yteva
Usage
This is for Pyrogram users.
from pyrogram import Client
from yteva import YTeva
app = Client("my_bot", api_id=123456, api_hash="your_api_hash", bot_token="your_bot_token")
yteva = YTeva(api_key="your_api_key", bot_app=app)
async async def main():
await app.start()
result = await yteva.download_audio("your_video_id")
print("Downloaded:", result)
await app.stop()
If you are using any program you can extract the link
from yteva import YTeva_direct
async def main():
yd = YTeva_direct(api_key="API_KEY")
test = await yd.play_audio_direct("VIDEO_ID")
print(test)
if __name__ == "__main__":
asyncio.run(main())
Search for videos
from yteva import YTSearch
search1 = YTSearch('Abo El Anwar - Scoo Scoo| ابو الانوار - سكو سكو', limit=1)
results1 = search1.result()
if results1['has_results']:
first_result = results1['result'][0]
print("Title:", first_result['title'])
print("Link:", first_result['link'])
print("Thumbnails:", first_result['thumbnails'][0]['url'])
print("Channel Name:", first_result['channel']['name'])
print("Duration:", first_result['duration'])
print("Views:", first_result['views'])
else:
print("No information found for the video")
if 'error' in results1:
print("The Reason:", results1['error'])
search2 = YTSearch('https://www.youtube.com/watch?v=u7QhfjHhnaA')
result2 = search2.result()
if result2['has_results']:
video_info = result2['result']
print("Title:", video_info['title'])
print("Link:", video_info['link'])
print("Thumbnails:", video_info['thumbnails'][0]['url'])
print("Channel Name:", video_info['channel']['name'])
print("Duration:", video_info['duration'])
print("Views:", video_info['views'])
else:
print("No information found for the video")
if 'error' in result2:
print("The Reason:", result2['error'])
search3 = YTSearch('https://youtu.be/u7QhfjHhnaA')
result3 = search3.result()
if result3['has_results']:
video_info = result3['result']
print("Title:", video_info['title'])
print("Link:", video_info['link'])
print("Thumbnails:", video_info['thumbnails'][0]['url'])
print("Channel Name:", video_info['channel']['name'])
print("Duration:", video_info['duration'])
print("Views:", video_info['views'])
else:
print("No information found for the video.")
if 'error' in result3:
print("The Reason:", result3['error'])
Developers of this project
- 𝙴𝚜𝚕𝚊𝚖 𝙼𝚘𝚑𝚊𝚖𝚎𝚍 - Original YTeva Author
- 𝙸𝚃𝙰𝙻𝚈 𝙼𝚄𝚂𝙸𝙲 - YTeva Co-Author
Join A Channel Telegram 🔻
- Channel Eslam
- Channel italy
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yteva-2025.4.15.tar.gz
(9.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yteva-2025.4.15.tar.gz.
File metadata
- Download URL: yteva-2025.4.15.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96f56b406e43c2450880414254a03c786bb2e29794f3db60ea268868bef27ea6
|
|
| MD5 |
eb19f4b1fe24b489ade6795068d527f2
|
|
| BLAKE2b-256 |
b2194e7c4972fc3b17b65141313c1d22b00f5cb496c939cc9a262357727a5cef
|
File details
Details for the file yteva-2025.4.15-py3-none-any.whl.
File metadata
- Download URL: yteva-2025.4.15-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e9dfb6dd686b87d5b010e91b9f9e7ea15fcf67bb4a277ac682d74b95f353df
|
|
| MD5 |
eb4473a2bb0d55aaa799d21e1ac76dbc
|
|
| BLAKE2b-256 |
afd087d555c6a391234f994e1b4a5d58a2ae8b51f03b350343c84a3d17880889
|