Skip to main content

yteva library for downloading audio and videos from YouTube and details about them.

Project description

YTeva

YTeva Logo

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

Join A Channel Telegram 🔻

  • Channel Eslam

Telegram Channel

  • Channel italy

Telegram Channel

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yteva-2025.4.15-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

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

Hashes for yteva-2025.4.15.tar.gz
Algorithm Hash digest
SHA256 96f56b406e43c2450880414254a03c786bb2e29794f3db60ea268868bef27ea6
MD5 eb19f4b1fe24b489ade6795068d527f2
BLAKE2b-256 b2194e7c4972fc3b17b65141313c1d22b00f5cb496c939cc9a262357727a5cef

See more details on using hashes here.

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

Hashes for yteva-2025.4.15-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e9dfb6dd686b87d5b010e91b9f9e7ea15fcf67bb4a277ac682d74b95f353df
MD5 eb4473a2bb0d55aaa799d21e1ac76dbc
BLAKE2b-256 afd087d555c6a391234f994e1b4a5d58a2ae8b51f03b350343c84a3d17880889

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page