diff options
Diffstat (limited to 'ATRI/utils/ub_paste.py')
-rw-r--r-- | ATRI/utils/ub_paste.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ATRI/utils/ub_paste.py b/ATRI/utils/ub_paste.py new file mode 100644 index 0000000..a0c0b07 --- /dev/null +++ b/ATRI/utils/ub_paste.py @@ -0,0 +1,11 @@ +from aiohttp import ClientSession, FormData + + +URL = "https://paste.ubuntu.com/" + + +async def paste(form_data) -> str: + async with ClientSession() as session: + async with session.post(url=URL, data=form_data) as r: + result = str(r.url).replace('https://', '') + return result |