def work(self): if config["Function"]["COIN2SILVER"] == "False": return if self.lock > int(time.time()): return self.exchange(config["Coin2Silver"]["COIN"]) self.lock = std235959() + 600
def work(self): if config["Function"]["SILVER2COIN"] == "False": return if self.lock > int(time.time()): return self.exchange() self.lock = std235959() + 600
def work(self): if config["Function"]["GROUP"] == "False": return if self.lock > int(time.time()): return groups = self.getList() count = len(groups) for each in groups: count -= self.signIn(each) if count == 0: self.lock = std235959() else: self.lock = int(time.time()) + 3600
def mobile(self): url = "https://api.live.bilibili.com/AppBag/sendDaily" payload = {} data = Curl().request_json("GET", url, headers=config["pcheaders"], params=payload) if data["code"] != 0: Log.warning("每日礼包领取失败(APP)") self.lock_mobile = int(time.time()) + 600 return else: Log.info("每日礼包领取成功(APP)") self.lock_mobile = std235959() + 600 return
def web(self): url = "https://api.live.bilibili.com/gift/v2/live/receive_daily_bag" payload = {} data = Curl().request_json("GET", url, headers=config["pcheaders"], params=payload) if data["code"] != 0: Log.warning("每日礼包领取失败") self.lock_wb = int(time.time()) + 600 return else: Log.info("每日礼包领取成功") self.lock_web = std235959() + 600 return
def work(self): if config["Function"]["TASK"] == "False": return if self.lock > int(time.time()): return Log.info("检查每日任务") data = self.check() self.double_watch_info(data) self.sign_info(data) if len(self.done) >= 2: self.done = [] self.lock = std235959() + 600 else: self.lock = int(time.time()) + 3600
def getTask(self): payload = {} data = Curl().get("https://api.live.bilibili.com/lottery/v1/SilverBox/getCurrentTask",payload) data = json.loads(data) if data["code"] == -10017: Log.info(data["message"]) self.lock = std235959() return if data["code"] != 0: Log.error("领取宝箱任务失败") return Log.info("领取宝箱成功,内含 %s 个瓜子"%data["data"]["silver"]) Log.info("等待 %s 分钟后打开宝箱"%data["data"]["minute"]) self.task = data["data"]["time_start"] self.lock = int(time.time()) + data["data"]["minute"] * 60 + random.randint(5,30)
def getTask(self): url = "https://api.live.bilibili.com/lottery/v1/SilverBox/getCurrentTask" payload = {} data = Curl().request_json("GET", url, headers=config["pcheaders"], params=payload) if data["code"] == -10017: Log.info(data["message"]) self.lock = std235959() + 600 return if data["code"] != 0: Log.error("领取宝箱任务失败") return Log.info("领取宝箱成功,内含 %s 个瓜子" % data["data"]["silver"]) Log.info("等待 %s 分钟后打开宝箱" % data["data"]["minute"]) self.task = data["data"]["time_start"] self.lock = int( time.time()) + data["data"]["minute"] * 60 + random.randint(5, 30)