# █ █ █ █▄▀ ▄▀█ █▀▄▀█ █▀█ █▀█ █ █ # █▀█ █ █ █ █▀█ █ ▀ █ █▄█ █▀▄ █▄█ # 🔒 Licensed under the GNU GPLv3 # 🌐 https://www.gnu.org/licenses/agpl-3.0.html # 👤 https://t.me/hikamoru # meta developer: @hikamorumods # meta banner: https://github.com/AmoreForever/assets/blob/master/fragment_checker.jpg?raw=true # requires: bs4 import requests from bs4 import BeautifulSoup from .. import loader, utils class Fragment(loader.Module): """Show how much is the username in the Fragment.com""" strings = {"name": "FragmentChecker"} @loader.command() async def fcheck(self, message): """check username in the Fragment.com""" args = utils.get_args_raw(message) response = requests.get(f"https://fragment.com/username/{args}") if response.status_code == 200: soup = BeautifulSoup(response.content, "html.parser") elements = soup.select(".table-cell-value.tm-value.icon-before.icon-ton") if elements: text = elements[0].text.strip() await utils.answer(message, f"💎 Username Found!\n✈️ Username: {args}\n🪙 Cost: {text} TON") if not elements: await utils.answer(message, f" Username {args} not found!")