////Запрос на сервис
var resultHttpPost = ZennoPoster.HttpGet(
url:"https://ws3.morpher.ru/russian/declension?s="+project.Variables["string"].Value,
proxy:"",
Encoding:"utf-8",
respType:ZennoLab.InterfacesLibrary.Enums.Http.ResponceType.BodyOnly,
Timeout:30000,
Cookies:"",
UserAgent:project.Profile.UserAgent,
UseRedirect:true,
MaxRedirectCount:5,
AdditionalHeaders: new [] {
"Host: ",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language: uk,ru;q=0.8,en-US;q=0.5,en;q=0.3 ", //+project.Profile.AcceptLanguage,
"Accept-Encoding: gzip, deflate, br" ,//+project.Profile.AcceptEncoding,
"Referer: ",
"Connection: keep-alive"
}
);
//Парсим ответ
var multi = Regex.Match(resultHttpPost, "(?<=ое>)[\\w\\W]*(?=</мн)").Value;
var R = Regex.Match(resultHttpPost, "(?<=<Р>).*?(?=</Р>)").Value;
var D = Regex.Match(resultHttpPost, "(?<=<Д>).*?(?=</Д>)").Value;
var V = Regex.Match(resultHttpPost, "(?<=<В>).*?(?=</В>)").Value;
var T = Regex.Match(resultHttpPost, "(?<=<Т>).*?(?=</Т>)").Value;
var P = Regex.Match(resultHttpPost, "(?<=<П>).*?(?=</П>)").Value;
var Im = Regex.Match(multi, "(?<=<И>).*?(?=</И>)").Value;
var Rm = Regex.Match(multi, "(?<=<Р>).*?(?=</Р>)").Value;
var Dm = Regex.Match(multi, "(?<=<Д>).*?(?=</Д>)").Value;
var Vm = Regex.Match(multi, "(?<=<В>).*?(?=</В>)").Value;
var Tm = Regex.Match(multi, "(?<=<Т>).*?(?=</Т>)").Value;
var Pm = Regex.Match(multi, "(?<=<П>).*?(?=</П>)").Value;
//Заносим в список
var list = project.Lists["Падежи"];
string text = project.Variables["string"].Value + "\t" + R +"\t"+ D +"\t"+ V +"\t"+ T +"\t"+ P + "\t" + Im + "\t" + Rm + "\t" + Dm + "\t" + Vm + "\t" + Tm + "\t" +Pm ;
list.Add(text);