/// <summary> /// 转长链接 /// </summary> /// <param name="cqMsg">返回的消息[CQ: rich, url=https://v.youku.com/v_show/id_XMzU5NDQzNzIxNg==.html?sharefrom=iphone,text=极限挑战 第四季20180510 会员解读版第2期:演技滑铁卢!内含男人帮最想删的片段 ]</param> /// <rturns></returns> public static MovieInfo Covert(string cqMsg) { //解析酷q消息体中的url链接 MovieInfo movie = parseMsg(cqMsg); movie.OriginalUrl = SystemConfig.ResourceApi + movie.Url; //组成可观看的视频地址 movie.Url = MyUrlTool.UrlEncode(SystemConfig.ResourceApi + movie.Url); return(movie); }
/// <summary> /// 转长链接 /// </summary> /// <param name="cqMsg">返回的消息[CQ: rich, url=https://v.youku.com/v_show/id_XMzU5NDQzNzIxNg==.html?sharefrom=iphone,text=极限挑战 第四季20180510 会员解读版第2期:演技滑铁卢!内含男人帮最想删的片段 ]</param> /// <rturns></returns> public static MovieInfo Covert(string cqMsg) { //解析酷q消息体中的url链接 MovieInfo movie = parseMsg(cqMsg); movie.OriginalUrl = KuYunSearch.selectJxApi(CacheData.resourceApiList[CacheData.MovieConfig.SelectedParserIndex], movie.Url); //组成可观看的视频地址 movie.Url = MyUrlTool.UrlEncode(KuYunSearch.selectJxApi(CacheData.resourceApiList[CacheData.MovieConfig.SelectedParserIndex], movie.Url)); return(movie); }
/// <summary> /// /// </summary> /// <param name="msg"></param> /// <param name="v">true 需要拼接视频接口</param> /// <returns></returns> public static string CovertUrlInSuoIm(string url, bool v) { string urlTemp = ""; if (v) { urlTemp = SystemConfig.ResourceApi + MyUrlTool.UrlEncode(url); return(CovertUrlInSuoIm(urlTemp)); } else//直接转短链 { return(CovertUrlInSuoIm(url)); } }
/// <summary> /// /// </summary> /// <param name="msg"></param> /// <param name="v">true 需要拼接视频接口</param> /// <returns></returns> public static string CovertUrlInSuoIm(string url, bool v) { string urlTemp = ""; if (v) { urlTemp = KuYunSearch.selectJxApi(CacheData.resourceApiList[CacheData.MovieConfig.SelectedParserIndex], MyUrlTool.UrlEncode(url)); MyLogUtil.ToLog("转换之前的链接:" + urlTemp); //MyLogUtil.ToLog("看看地址:" + urlTemp); return(CovertUrlInSuoIm(urlTemp)); } else//直接转短链 { return(CovertUrlInSuoIm(url)); } }