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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for youtubemusic-7.2.0.tar.gz
Algorithm Hash digest
SHA256 3e96fde2fd69312e477858b9abc95bb6993674fbb84e115a751a8a65a5b7f765
MD5 3632ad5470d6f1595c2016b2109b0d25
BLAKE2b-256 73b7fde00b3d45df9b8d6d56c27185bb99de6040f545213ec63c616f19dba3ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: youtubemusic-7.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e09c54806014be24ffca09e193eed590aafafa221f7dfaf4bf33c7a6ae06f785
MD5 d9a0a7198d853d42d9be59fd0a084035
BLAKE2b-256 c28f0184305efce2180bac79e6dbd3069b05267a268f8d329b16fd0e224f5ea1

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