Core API
This section provides a detailed reference for the core components of the TrueLink library.
truelink.TrueLinkResolver
Main resolver class for extracting direct download links.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
timeout
|
int
|
Request timeout in seconds (default: 30) |
30
|
max_retries
|
int
|
Maximum number of retries for failed attempts (default: 3) |
3
|
proxy
|
str
|
Proxy URL (optional) |
None
|
get_supported_domains
staticmethod
is_supported
staticmethod
register_resolver
classmethod
Register a new resolver.
resolve
async
Resolve a URL to direct download link(s) and return as a LinkResult or FolderResult object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The URL to resolve |
required |
use_cache
|
bool
|
Whether to use the cache |
False
|
Returns:
Type | Description |
---|---|
LinkResult | FolderResult
|
A LinkResult or FolderResult object. |
Raises:
Type | Description |
---|---|
InvalidURLException
|
If URL is invalid |
UnsupportedProviderException
|
If provider is not supported |
ExtractionFailedException
|
If extraction fails after all retries |