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-7.5.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.5.0-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: youtubemusic-7.5.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.5.0.tar.gz
Algorithm Hash digest
SHA256 71ad0a7a17cd46161f026480ad5ef1e539e48f10d9856f8c633c59128effb690
MD5 9d95e499dec9996f6034ecadc03f68f4
BLAKE2b-256 019d523af3fcb69c8b6d51efc7310ae38724d132757b84286a3a1e52c02ef7fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: youtubemusic-7.5.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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e868d0bf953c57b9c628fc918384ecb5178125b01f71886105a8d77560854719
MD5 6188b486a7ce18cc7259047fc16fed3c
BLAKE2b-256 50037d9e52ea8f9098cfdd073bcccd13e8023eb1ffa286a47252cfb3e40ecd03

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