/// <summary> /// 分享视频 /// </summary> /// <param name="aid">视频aid</param> public void ShareVideo(string aid, string title = "") { BiliApiResponse apiResponse = _dailyTaskApi.ShareVideo(aid, _biliBiliCookieOptions.BiliJct).GetAwaiter().GetResult(); if (apiResponse.Code == 0) { _expDic.TryGetValue("每日观看视频", out int exp); _logger.LogInformation("视频分享成功,经验+{exp} √", exp); } else { _logger.LogError("视频分享失败,原因: {msg}", apiResponse.Message); } }
/// <summary> /// 分享视频 /// </summary> /// <param name="aid">视频aid</param> public void ShareVideo(string aid, string title = "") { var apiResponse = _dailyTaskApi.ShareVideo(aid, _biliBiliCookieOptions.BiliJct).Result; if (apiResponse.Code == 0) { _logger.LogInformation("视频分享成功"); } else { _logger.LogInformation("视频分享失败,原因: {msg}", apiResponse.Message); _logger.LogDebug("开发者提示: 如果是csrf校验失败请检查BILI_JCT参数是否正确或者失效"); } }
/// <summary> /// 分享视频 /// </summary> /// <param name="aid">视频aid</param> public void ShareVideo(string aid, string title = "") { BiliApiResponse apiResponse = _dailyTaskApi.ShareVideo(aid, _biliBiliCookieOptions.BiliJct).Result; if (apiResponse.Code == 0) { _expDic.TryGetValue("每日观看视频", out int exp); _logger.LogInformation("视频分享成功,经验+{exp} √", exp); } else { _logger.LogInformation("视频分享失败,原因: {msg}", apiResponse.Message); _logger.LogDebug("开发者提示: 如果是csrf校验失败请检查BILI_JCT参数是否正确或者失效"); } }