Skip to main content

SoundCloud search & MP3 downloader

Project description

scl-minh

🎵 SoundCloud Search & MP3 Downloader Library (Python)

Thư viện Python giúp tìm kiếm bài hát trên SoundCloud theo từ khóatải file MP3 trực tiếp thông qua API.


👤 Author

Ho Duc Minh

🌐 Website: https://vippro88.shop

📜 License: MIT


🚀 Cài đặt

pip install scl-minh

"""
Example usage for scl-minh
Author : Ho Duc Minh
Website: https://vippro88.shop
"""

from scl import search, scl


def main():
    print("🎵 scl-minh SoundCloud Tool")
    print("1️⃣ Nhập từ khóa để tìm kiếm")
    print("2️⃣ Dán link SoundCloud để tải trực tiếp")
    print("-" * 40)

    user_input = input("👉 Nhập từ khóa hoặc link SoundCloud: ").strip()

    if not user_input:
        print("❌ Không được để trống")
        return

    # Nếu là link SoundCloud → tải luôn
    if user_input.startswith("http"):
        print("\n⬇️ Đang tải từ link...\n")
        scl(user_input)
        print("\n✅ Tải xong!")
        return

    # Nếu là từ khóa → tìm kiếm
    print(f"\n🔍 Đang tìm kiếm: '{user_input}'...\n")
    results = search(user_input, limit=5)

    if not results:
        print("❌ Không tìm thấy kết quả")
        return

    # Hiển thị kết quả
    for i, song in enumerate(results, 1):
        print(f"{i}. {song['title']}")
        print("   Duration:", song["duration"])
        print("   URL     :", song["url"])
        print("-" * 40)

    # Người dùng chọn bài để tải
    choice = input("\n👉 Chọn số bài muốn tải (0 để hủy): ").strip()

    if not choice.isdigit():
        print("❌ Lựa chọn không hợp lệ")
        return

    choice = int(choice)

    if choice == 0:
        print("🚫 Đã hủy")
        return

    if choice < 1 or choice > len(results):
        print("❌ Số không hợp lệ")
        return

    print("\n⬇️ Đang tải bài đã chọn...\n")
    scl(results[choice - 1]["url"])

    print("\n✅ Hoàn tất!")


if __name__ == "__main__":
    main()

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

scl_minhv1-1.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

scl_minhv1-1.1.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file scl_minhv1-1.1.1.tar.gz.

File metadata

  • Download URL: scl_minhv1-1.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for scl_minhv1-1.1.1.tar.gz
Algorithm Hash digest
SHA256 54b78f310ca25a9a3d5fe789e3084d5d8f8f1b5e392e733f60f0dddd45bb6d23
MD5 35170da9562e342506047e20e6a0ef83
BLAKE2b-256 8eb1fcbdacd25d7bb99e1a22b64e4c4142e457c94e471ae8dfa0a06cdd404d65

See more details on using hashes here.

File details

Details for the file scl_minhv1-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: scl_minhv1-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for scl_minhv1-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4b5431e404b81ee9bafdb09e2702a4804d8fbfd48be6638f48894ece8ae77d0
MD5 d7b8dec04b74646cc195f23440790d09
BLAKE2b-256 cc6047268e9438e6e9c1e418323a04f4f45898e6dcd6a65929fcb00ad67610a5

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