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.3.0.tar.gz (29.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-7.3.0-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for youtubemusic-7.3.0.tar.gz
Algorithm Hash digest
SHA256 5c0b016be3790cf7aa0cf3797d7d9a8feb4981ab8d9bc37963fc5104eb7893c7
MD5 acd998a18c3823347da03da2d5e3da57
BLAKE2b-256 c5a4fd257b142c416e04fc4f3a66e1a9d2ce3bda9201d5bda35518d9393a35a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: youtubemusic-7.3.0-py3-none-any.whl
  • Upload date:
  • Size: 31.7 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 512a81131825c0d157677e332eae8b4b992adc41e943a27f2e6912a7d683f867
MD5 7a363f2be58399a8cabc414077351d87
BLAKE2b-256 7be384a38a4ccb9ae0343ca1aaaed67f8b06941d6440446aff8a4fb0bc3315b1

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