MdiskPro
A Unofficial Wrapper for Mdiskpro.xyz
·
Report Bug / Request Feature
·
Usage
·
Reference
MdiskPro
An Unofficial Python version of Mdiskpro.xyz. Used to Short your long link and let you Earn from it.
Installation
Install shortzy with pip
pip install mdiskpro
To Upgrade
pip install --upgrade mdiskpro
Usage
from mdiskpro import MdiskPro
import asyncio
mdiskpro = MdiskPro('<YOUR API KEY>')
async def main():
link = await mdiskpro.convert('https://example.com/')
print(link)
asyncio.run(main())
Output: https://mdiskpro.in/mVkra
Features
- Single URL Convert
- Batch Convert from List
- Convert from Text
Contributing
Contributions are always welcome!
Reference
Init
from mdiskpro import Shortzy
import asyncio
mdiskpro = MdiskPro(api_key="Your API Key")
Convert a single URL
convert(link, alias, silently_fail, quick_link) -> str
| Parameter | Type | Description |
|---|---|---|
link |
string |
Required. Long URL Link |
alias |
string |
Custom alias for the link |
silently_fail |
bool |
Raise an exception or not if error ocuurs |
quick_link |
bool |
Returns the quick link |
Example:
async def main():
link = await mdiskpro.convert('https://www.youtube.com/watch?v=d8RLHL3Lizw')
print(link)
asyncio.run(main())
Convert from Text
convert_from_text(text:str, silently_fail:bool=True, quick_link:bool=False) -> str
| Parameter | Type | Description |
|---|---|---|
text |
str |
Required. Text containing Long URLS to short |
Example:
async def main():
text = """
Unstoppable:-https://www.youtube.com/watch?v=330xlOv8p9M
Night Changes:-https://www.youtube.com/watch?v=syFZfO_wfMQ
"""
link = await MdiskPro.convert_from_text(text)
print(link)
asyncio.run(main())
Get quick link
get_quick_link(link:str)
| Parameter | Type | Description |
|---|---|---|
link |
str |
Required. Long Link |
Example:
async def main():
link = "https://www.youtube.com/watch?v=syFZfO_wfMQ"
quick_link = await MdiskPro.get_quick_link(link)
print(quick_link)
asyncio.run(main())
Credits
Metadata
Release files for mdiskpro 0.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mdiskpro-0.0.13.tar.gz | 17.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mdiskpro-0.0.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.7 kB
Release files / mdiskpro-0.0.13.tar.gz
| Download URL | mdiskpro-0.0.13.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d82f91b311ce927c079e69551aca089b296e79a1be57ce4271ad5494d0c5368
|
|
BLAKE2b-256 checksum How to use checksums |
c5bb30a99b1c924d7221e7755024fa045aded34abb27cebda62ebfe5b3ab34c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|
Release files / mdiskpro-0.0.13-py3-none-any.whl
| Download URL | mdiskpro-0.0.13-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b4918ded84f63177f954d26156575b064791a785bc7f996dc89e5f256315d0e
|
|
BLAKE2b-256 checksum How to use checksums |
53eba27ec199438a8466fcfff95647d3ad47b70554f3f70785e67f5527e9cb0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.14
|