File size: 529 Bytes
80287e2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import aiohttp
BASE = "https://batbin.me/"
async def post(url: str, *args, **kwargs):
async with aiohttp.ClientSession() as session:
async with session.post(url, *args, **kwargs) as resp:
try:
data = await resp.json()
except Exception:
data = await resp.text()
return data
async def AnonyBin(text):
resp = await post(f"{BASE}api/v2/paste", data=text)
if not resp["success"]:
return
link = BASE + resp["message"]
return link
|