def main(self, chat):
    current_id = random.choice(self.servers_id)
    url = 'https://www.speedssh.com/'
    req = self.session.get(url)
    cookies = dict(req.cookies)
    url = 'https://www.speedssh.com/create-account-ssh.php'
    headers = {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Host': 'www.speedssh.com', 'Origin': 'https://www.speedssh.com', 'Referer': 'https://www.speedssh.com/create-ssh-account-server/30/ssh-server-united-states-1', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': 'same-origin', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36 OPR/74.0.3911.75', 'X-Requested-With': 'XMLHttpRequest'}
    data = f'serverid={current_id}&username={self.username}&password={self.password}'
    req = self.session.post(url, headers=headers, data=data)
    if ('Your Account has been successfully created' in req.text):
        host_ip = req.text.split('<br>')[6].split(':')[1].strip()
        all_info = f'{host_ip}:443@speedssh.com-{self.username}:{self.password}'
        ex = req.text.split('<br>')[8]
        alls = f'''host : {host_ip} 
username : speedssh.com-{self.username}
pass : {self.password}
http_custom : {host_ip}:443@speedssh.com-{self.username}:{self.password}
{ex}'''
        bot.sendMessage(chat, alls)
        return alls
    elif ('has reached Account maximum' in req.text):
        self.servers_id.remove(current_id)
        self.main(chat)
    else:
        self.servers_id.remove(current_id)
        self.main(chat)
def main(self, chat):
    current_id = random.choice(self.servers_id)
    url = 'https://www.speedssh.com/'
    req = self.session.get(url)
    cookies = dict(req.cookies)
    url = 'https://www.speedssh.com/create-account-ssh.php'
    headers = {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Host': 'www.speedssh.com', 'Origin': 'https://www.speedssh.com', 'Referer': 'https://www.speedssh.com/create-ssh-account-server/30/ssh-server-united-states-1', 'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': 'same-origin', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36 OPR/74.0.3911.75', 'X-Requested-With': 'XMLHttpRequest'}
    data = f'serverid={current_id}&username={self.username}&password={self.password}'
    req = self.session.post(url, headers=headers, data=data)
    if ('Your Account has been successfully created' in req.text):
        host_ip = req.text.split('<br>')[6].split(':')[1].strip()
        all_info = f'{host_ip}:443@speedssh.com-{self.username}:{self.password}'
        ex = req.text.split('<br>')[8]
        alls = f'host : {host_ip} 
username : speedssh.com-{self.username}
pass : {self.password}
http_custom : {host_ip}:443@speedssh.com-{self.username}:{self.password}
{ex}'
        bot.sendMessage(chat, alls)
        return alls
    elif ('has reached Account maximum' in req.text):
        self.servers_id.remove(current_id)
        self.main(chat)
    else:
        self.servers_id.remove(current_id)
        self.main(chat)