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:
        raise Exception("No results found.")

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

    stream_url = results[0]["url"]
    
    return search_data, stream_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-5.1.0.tar.gz (5.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-5.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for youtubemusic-5.1.0.tar.gz
Algorithm Hash digest
SHA256 5f8347aaca00205ec2cf37f1b937548a24ef5346d98d0edee92836013a0a6d75
MD5 f654412e366fd3be205138c739af0199
BLAKE2b-256 8758743c9b0f0fe0add3e8d3349aa53d836c38fca1eeef93beda0556d91e6e68

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for youtubemusic-5.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 965ba1ff5d467695c0c7d92737254eea3435a4ab6c5e9c312780d9f2c25046d3
MD5 2fd52bb2de82c8a9ddacd48e95cb7d10
BLAKE2b-256 02373f333c613530edb392857b1412a3c38ecb11c429648cd5532435a756e8b9

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