Skip to main content

Extract direct download links from various URL formats

Project description

TrueLink

PyPI version Downloads

A Python library for resolving media URLs to direct download links from various file hosting services.

Features

  • Asynchronous: Built with async/await for efficient handling of multiple requests.
  • Easy to use: Simple API with intuitive method names.
  • Extensible: Support for multiple file hosting platforms.
  • Caching: Built-in caching for faster resolution of repeated requests.
  • Error handling: Robust error handling for various edge cases.
  • URL validation: Built-in URL validation before processing.
  • Type-hinted: Fully type-hinted codebase for better readability and maintainability.

Installation

pip install truelink

Quick Start

import asyncio
from truelink import TrueLinkResolver

async def main():
    # Check if a URL is supported without creating an instance
    if TrueLinkResolver.is_supported("https://buzzheavier.com/rnk4ut0lci9y"):
        print("BuzzHeavier is supported!")

    resolver = TrueLinkResolver()
    url = "https://buzzheavier.com/rnk4ut0lci9y"

    try:
        result = await resolver.resolve(url)
        print(type(result))
        print(result)
    except Exception as e:
        print(f"Error processing {url}: {e}")

asyncio.run(main())

Documentation

For more information, see the documentation.

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

truelink-1.3.0.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

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

truelink-1.3.0-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

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