/// <summary> /// 漫画签到 /// </summary> public void MangaSign() { BiliApiResponse response; try { response = _mangaApi.ClockIn(_dailyTaskOptions.DevicePlatform).GetAwaiter().GetResult(); } catch (Exception) { //ignore //重复签到会报400异常,这里忽略掉 _logger.LogInformation("【签到结果】:失败"); _logger.LogInformation("【原因】:今日已签到过,无法重复签到"); return; } if (response.Code == 0) { _logger.LogInformation("【签到结果】:成功"); } else { _logger.LogInformation("【签到结果】:失败"); _logger.LogInformation("【原因】:{msg}", response.Message); } }
/// <summary> /// 漫画签到 /// </summary> public void MangaSign() { BiliApiResponse response; try { response = _mangaApi.ClockIn(_dailyTaskOptions.DevicePlatform).GetAwaiter().GetResult(); } catch (Exception) { //ignore //重复签到会报400异常,这里忽略掉 _logger.LogInformation("今日已签到过,无法重复签到"); return; } if (response.Code == 0) { _logger.LogInformation("完成漫画签到"); } else { _logger.LogInformation("漫画签到异常"); } }