def get_lang(self): return lang.getLang(self.jid)
def lmsg(self, typ, template, *params): self.msg(typ, lang.msg(template, params, lang.getLang(self.jid)))
def msg(self, typ, body): if len(body)>8000: body = body[:8000]+'...' if (typ=='groupchat') and self.room and (len(body)>self.room.get_msglimit()): self.bot.muc.msg(typ, self.jid, lang.msg('see_private', l=lang.getLang(self.jid))) typ = 'chat' self.bot.muc.msg(typ, self.jid, body)
import requests from bs4 import BeautifulSoup from headers import headerCount from title import titleText from meta import metaTags from schema import checkSchema from lang import getLang from imgdata import imgAlt url = "https://heapoftech.live/" html = requests.get(url) page = BeautifulSoup(html.content, "html.parser") print(type(page)) print(headerCount(page)) print(titleText(page)) print(metaTags(page)) print(checkSchema(page)) print(getLang(page)) print(imgAlt(page))
def lmsg(self, template, *params): self.msg(lang.msg(template, params, lang.getLang(self.jid)))