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"],
            "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-7.1.0.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

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

youtubemusic-7.1.0-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for youtubemusic-7.1.0.tar.gz
Algorithm Hash digest
SHA256 aac9ce9bc63d6b9f711065a2df962da7e9d58c523b2e8fa81d465d6081dff923
MD5 3fcf4f99977285bf5323a1cbda4097da
BLAKE2b-256 cb2e9859af941c0f255020fdb51f9de6ea966dae75666f58883ac2368f23f02e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for youtubemusic-7.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b459efe094c123a3b5c636141b5912eb18ed11958bfe4912dc36d3585fcacb0
MD5 c6d008d71919939c66575495ac6fba8b
BLAKE2b-256 5c59ee757c04d7fcad384bc2bca2c22a3d1e02cf581f635d652641764c456f06

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