Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevinnadar22/shortzy
An Unofficial Python version of Adlinkfly and Alternative Website API wrapper
https://github.com/kevinnadar22/shortzy
droplink earn gplinks url-shortener url-shortener-api
Last synced: 3 days ago
JSON representation
An Unofficial Python version of Adlinkfly and Alternative Website API wrapper
- Host: GitHub
- URL: https://github.com/kevinnadar22/shortzy
- Owner: kevinnadar22
- License: agpl-3.0
- Created: 2022-07-26T11:24:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-29T21:14:21.000Z (3 months ago)
- Last Synced: 2025-01-30T12:48:07.124Z (16 days ago)
- Topics: droplink, earn, gplinks, url-shortener, url-shortener-api
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 3
- Watchers: 1
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
Shortzy
A Unofficial Wrapper for Adlinkfly Site and Alternative Sites
·
Report Bug / Request Feature
·
Usage
·
Reference
---
# Shortzy
An Unofficial Python version of Adlinkfly and Alternative Website API wrapper. Used to Short your long link and let you earn from it.## Installation
Install shortzy with pip
```bash
pip install shortzy
```
To Upgrade```bash
pip install --upgrade shortzy
```
## Usage```python
from shortzy import Shortzy
import asyncioshortzy = Shortzy('')
async def main():
link = await shortzy.convert('https://example.com/')
print(link)asyncio.run(main())
``````python
Output: https://droplink.co/mVkra
```## Available Websites
Available list of Websites
- droplink.co
- gplinks.in
- tnlink.in
- za.gl
- du-link.in
- viplink.in
- shorturllink.in
- shareus.in
- Request For Your Website !
## Features
- Single URL Convert
- Batch Convert from List
- Convert from Text## Contributing
Contributions are always welcome!
## Reference
### Init
```python
from shortzy import Shortzy
import asyncioshortzy = Shortzy(api_key="Your API Key", base_site="droplink.co")
# Base site defaults to "droplink.co". You can add your own site here which is alternative to this default site
# Please Refer https://github.com/kevinnadar22/shortzy#available-websites for more information
```### Convert a single URL
```python
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:
```python
async def main():
link = await shortzy.convert('https://www.youtube.com/watch?v=d8RLHL3Lizw')
print(link)asyncio.run(main())
## Output: https://droplink.co/Ly4fCxZ
## Quick Link: https://droplink.co/st?api=&url=https://www.youtube.com/watch?v=d8RLHL3Lizw
```### Bulk Convert
```python
bulk_convert(urls:list, silently_fail, quick_link:bool=False) -> list
```| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `urls` | `list` | **Required**. List of URLs to convert |Example:
```python
async def main():
links = ['https://github.com/', 'https://twitter.com/', 'https://google.com/']
link = await shortzy.bulk_convert(links)
print(link)asyncio.run(main())
## Output: ['https://droplink.co/ihu1e', 'https://droplink.co/AkY2Nt', 'https://droplink.co/mK1eVTV']
```### Convert from Text
```python
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:
```python
async def main():
text = """
Unstoppable:-https://www.youtube.com/watch?v=330xlOv8p9M
Night Changes:-https://www.youtube.com/watch?v=syFZfO_wfMQ
"""
link = await shortzy.convert_from_text(text)
print(link)asyncio.run(main())
# Output:
# "Unstoppable:-https://droplink.co/T6jbHlU
# Night Changes:-https://droplink.co/ajIRE"
```### Get quick link
```python
get_quick_link(link:str)
```| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `link` | `str` | **Required**. Long Link|Example:
```python
async def main():
link = "https://www.youtube.com/watch?v=syFZfO_wfMQ"
quick_link = await shortzy.get_quick_link(link)
print(quick_link)asyncio.run(main())
## Quick Link: https://droplink.co/st?api=&url=https://www.youtube.com/watch?v=syFZfO_wfMQ
```## Support
For support, email [email protected] or PM [Dev](https://t.me/ask_admin001)
## Roadmap
- Add more integrations
## Disclaimer
[![GNU Affero General Public License v3.0](https://www.gnu.org/graphics/agplv3-155x51.png)](https://www.gnu.org/licenses/agpl-3.0.en.html#header)
Licensed under [GNU AGPL v3.0.](https://github.com/kevinnadar22/shortzy/blob/main/LICENSE)
Selling The Codes To Other People For Money Is *Strictly Prohibited*.## Credits
- [Thanks To Me](https://github.com/Kevinnadar22)