using CsharpHttpHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VideoFission
{
public static class Tools
{
///
/// 返回一个随机解析完成的短链接
///
/// 要解析的链接
///
public static string FindAnalysisUrlFulfill(string url)
{
try
{
if (string.IsNullOrWhiteSpace(Class1.Config.AnalysisLink)) return string.Empty;
var rows = Class1.Config.AnalysisLink.Split(new string[] { @"
" }, StringSplitOptions.RemoveEmptyEntries);
if (rows != null && rows.Length != 0)
return Api.Framework.ApiClient.ShortURL(rows[new Random().Next(0, rows.Length)] + url).Result;
}
catch
{ }
return string.Empty;
}
}
}