Skip to main content

A YouTube Music Search Package With Artist, Channel, and Video Details

Project description

YouTubeMusic 🔥

A blazing fast YouTube music search module using DuckDuckGo scraping.

Features

  • No YouTube API needed ✅
  • Fast + lightweight async search engine ⚡
  • Perfect for Telegram bots, CLI tools, and more 🎧

Install

pip install YouTubeMusic

How To Install

# Search By YouTube Search API
from YouTubeMusic.YtSearch import Search

# Search Using Httpx And Re
from YouTubeMusic.Search import Search

Example Usage

from YouTubeMusic.Search import Search
#from YouTubeMusic.YtSearch import Search

async def SearchYt(query: str):
    results = await Search(query, limit=1)

    if not results or not results.get("main_results"):
        raise Exception("No results found.")

    item = results["main_results"][0] 

    search_data = [{
        "title": item.get("title"),
        "artist": item.get("artist_name"),
        "channel": item.get("channel_name"),
        "duration": item.get("duration"),
        "views": item.get("views"),
        "thumbnail": item.get("thumbnail"),
        "url": item.get("url")
    }]

    song_url = item["url"] 

    return search_data, song_url

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

youtubemusic-8.0.0.tar.gz (30.0 kB view details)

Uploaded Source

Built Distribution

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

youtubemusic-8.0.0-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file youtubemusic-8.0.0.tar.gz.

File metadata

  • Download URL: youtubemusic-8.0.0.tar.gz
  • Upload date:
  • Size: 30.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for youtubemusic-8.0.0.tar.gz
Algorithm Hash digest
SHA256 3479fb214d59fac5245e9ae6c388ed520e58afbb14e1525601a571f68e4c8b73
MD5 44ed299db5a89f2b3ccfc5fb30a86cd1
BLAKE2b-256 06be2ca03763ce5cb67f8ca3d5efc09a181bce6c2c6948d72536a08d27db2453

See more details on using hashes here.

File details

Details for the file youtubemusic-8.0.0-py3-none-any.whl.

File metadata

  • Download URL: youtubemusic-8.0.0-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for youtubemusic-8.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 161a2bde557cac144a4bf49ee04c955f03e2a89b301ae277e77e621b4a9d2e30
MD5 db6787c26618cc26f2985e7fdbcfbdea
BLAKE2b-256 730d83d3f353a304bea9ba229e01d08ee3eba0db15ca1caf9218892d02d9e3de

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