def main(argv): config.logo() base.init() try: opts, args = getopt.getopt(argv, "ha:s:d:r:t:c", ["help","attone=", "attsrc=","attdetail=","readppp=","thread=","clean"]) except getopt.GetoptError: config.scanHelp() sys.exit(2) for opt, arg in opts: target = arg filename = arg if opt in ("-h","--help"): config.scanHelp() sys.exit() elif opt in ("-t","--thread"): config.ThreadNum=int(arg) elif opt in ("-a", "--attone"): oneFoxScan(target) elif opt in ("-s", "--attsrc"): foxScan(target) elif opt in ("-d", "--attdetail"): foxScanDetail(target) elif opt in ("-r","--readppp"): pppFoxScan(filename) elif opt in ("-c","--clean"): config.delModel() sys.exit() else: config.scanHelp() sys.exit() SendNotice("{} 花溪九尾扫描完毕,保存文件名为 {} ".format(target,filename)) return
def main(argv): config.logo() try: opts, args = getopt.getopt(argv, "ha:s:d:r:t:", [ "help", "attone=", "attsrc=", "attdetail=", "readppp=", "thread=" ]) except getopt.GetoptError: config.scanHelp() sys.exit(2) # print(opts) for opt, arg in opts: if opt in ("-h", "--help"): config.scanHelp() sys.exit() elif opt in ("-t", "--thread"): config.ThreadNum = int(arg) elif opt in ("-a", "--attone"): target = arg oneFoxScan(target) elif opt in ("-s", "--attsrc"): target = arg foxScan(target) elif opt in ("-d", "--attdetail"): target = arg foxScanDetail(target) elif opt in ("-r", "--readppp"): filename = arg pppFoxScan(filename) else: config.scanHelp() sys.exit() return
def main(): try: config.logo() init.main(standalone_mode=False) except Exception as e: print(e) pass return
def quote_fwr(self, reply, peer_id): self.api.messages.setActivity(type='typing', peer_id=peer_id) quote_logo = logo(peer_id) ids = [] for i in range(len(reply)): ids.append(reply[i]['from_id']) ids = set(ids) ids = list(ids) links = [] users = [] text = [] usr_data = self.api.users.get(user_ids=str(ids)[1:-1].replace(" ", ""), fields='photo_max') for i in range(len(usr_data)): links.append(usr_data[i]['photo_max']) author = f"{usr_data[i]['first_name']} {usr_data[i]['last_name']}" users.append(author) for i in range(len(reply)): text.append(reply[i]['text']) Quotes(authors=users, text=text, links=links, logo=quote_logo) resp = VkUpload(self.session).photo_messages( photos=path.abspath('picgen/templates/quote.png')) self.api.messages.send( peer_id=peer_id, random_id=randint(0, 512), message='Цитатка...', attachment=f"photo{resp[0]['owner_id']}_{resp[0]['id']}")
def quote_repl(self, reply, peer_id): self.api.messages.setActivity(type='typing', peer_id=peer_id) quote_logo = logo(peer_id) usr_id = [reply['from_id']] text = [reply['text']] usr_data = self.api.users.get(user_ids=usr_id, fields='photo_max') link = [usr_data[0]['photo_max']] usr_name = [f"{usr_data[0]['first_name']} {usr_data[0]['last_name']}"] Quotes(authors=usr_name, text=text, links=link, logo=quote_logo) resp = VkUpload(self.session).photo_messages( photos=path.abspath('picgen/templates/quote.png')) self.api.messages.send( peer_id=peer_id, random_id=randint(0, 512), message='Цитатка...', attachment=f"photo{resp[0]['owner_id']}_{resp[0]['id']}")