def lib(update, context): list1 = context.args url = ' '.join(list1) #print(url) result, time = thread_javlib(url) text = str(result) + '\n' + str(time) msg = func_handler.long_message(update, context, text)
def girl_ide(update, context): try: photo_file = update.message.effective_attachment.get_file() except: photo_file = update.message.photo[-1].get_file() photo_file.download('user_photo.jpg') update.message.reply_text('正在识别,请稍候') result = girl() msg = func_handler.long_message(update, context, result, 'markdown') os.remove("user_photo.jpg") return ConversationHandler.END
def searchall(update, context): if len(context.args) == 1: searchstr = context.args[0] else: searchstr = ' '.join(context.args[:]) #print(searchstr) text = dmmsearchall(searchstr) msg = func_handler.long_message(update, context, text, 'markdown')
def dmmlink(update, context): if len(context.args) == 1: searchlink = context.args[0] else: searchlink = ' '.join(context.args[:]) #print(searchlink) text = dmmlinks(searchlink) msg = func_handler.long_message(update, context, text, 'markdown')
def magnet(update, context): if len(context.args) == 1: searchid = context.args[0] num = re.findall(r'([a-zA-Z]+)-?[ ]?(\d{1,})', searchid) if num != []: searchid = ' '.join(num[0]) else: searchid = ' '.join(context.args[:]) result = sukebei(searchid) msg = func_handler.long_message(update, context, result, 'markdown')
def dmmid(update, context): searchid = context.args[0] update.message.reply_text('search items for %s please wait...' % searchid) result, time = dmm_thread(searchid) usetime = '搜索完成,耗时:' + time + '秒' update.message.reply_text(usetime) #update.message.reply_text(result) if len(result) > 4096: mssg = '超出telegram消息限制,将分段截取,取最后10字符用于校验:' + result[-10:] update.message.reply_text(mssg) msg = func_handler.long_message(update, context, result)
def monthlyy(update, context): #print(context.args) chat_id = update.message.chat_id id = context.args #print(id) idlist = ','.join(id) searchlist1 = idlist.split(',') leng3 = len(searchlist1) update.message.reply_text('正在查询%s个...请稍候......' % leng3) mon, leng, nomon, leng1, time, tbb, tbbb, noresult, noresultleng = monthly_thread( idlist) tb = str(tbb) usetime = '耗时:' + time + '秒' if leng == 0: if leng1 == 0: noresult = '无结果 (%s) => %s' % (noresultleng, noresult) msg = func_handler.long_message(update, context, noresult) else: result1 = '非月额list (%s) => %s' % (leng1, nomon) if func_handler.Config.iftb == 'true': msg = func_handler.long_message(update, context, tb) msg = func_handler.long_message(update, context, result1) if noresultleng > 0: noresult = '无结果 (%s) => %s' % (noresultleng, noresult) msg = func_handler.long_message(update, context, noresult) update.message.reply_text(usetime) else: if leng1 == 0: if func_handler.Config.iftb == 'true': msg = func_handler.long_message(update, context, tb) result = '月额list (%s) => %s' % (leng, mon) msg = func_handler.long_message(update, context, result) if noresultleng > 0: noresult = '无结果 (%s) => %s' % (noresultleng, noresult) msg = func_handler.long_message(update, context, noresult) update.message.reply_text(usetime) else: result = '月额list (%s) => %s' % (leng, mon) result1 = '非月额list (%s) => %s' % (leng1, nomon) if func_handler.Config.iftb == 'true': msg = func_handler.long_message(update, context, tb) msg = func_handler.long_message(update, context, result) msg = func_handler.long_message(update, context, result1) if noresultleng > 0: noresult = '无结果 (%s) => %s' % (noresultleng, noresult) msg = func_handler.long_message(update, context, noresult) update.message.reply_text(usetime)
def faleno(update, context): args = context.args faleno = Faleno(args) result = faleno.option() msg = func_handler.long_message(update, context, result, 'markdown')
def top30(update, context): searchlink = 'https://www.dmm.co.jp/digital/videoa/-/list/=/limit=30/sort=ranking/' text = dmmlinks(searchlink) msg = func_handler.long_message(update, context, text, 'markdown')
def new30(update, context): searchlink = 'https://www.dmm.co.jp/digital/videoa/-/list/=/article=latest/limit=30/sort=date/' text = dmmlinks(searchlink) msg = func_handler.long_message(update, context, text, 'markdown')
def stream(update, context): args = context.args javmost = Javmost(args) result = javmost.option() msg = func_handler.long_message(update, context, result, 'markdown')