private void ParserTenderObj(JToken t) { var id = ((string)t.SelectToken("filingNumber") ?? "").Trim(); var purName = ((string)t.SelectToken("title") ?? "").Trim(); var publicationDateT = ((string)t.SelectToken("gdStartDate") ?? "").Trim(); var endDateT = ((string)t.SelectToken("gdEndDate") ?? (string)t.SelectToken("gdEndDate") ?? "").Trim(); endDateT = endDateT.GetDataFromRegex(@"(\d{2}\.\d{2}\.\d{4}\s+\d{2}:\d{2})"); var publicationDate = publicationDateT.ParseDateUn("dd.MM.yyyy HH:mm"); var endDate = endDateT.ParseDateUn("dd.MM.yyyy HH:mm"); var href = ((string)t.SelectToken("lotLink") ?? "").Trim(); href = $"https://market.lot-online.ru/{href}"; if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(href) || publicationDate == DateTime.MinValue || endDate == DateTime.MinValue) { Log.Logger("bad tender", id); return; } var orgName = ((string)t.SelectToken("organizer.title") ?? "").Trim(); var orgInn = ((string)t.SelectToken("organizer.inn") ?? "").Trim(); var status = ((string)t.SelectToken("state.title") ?? "").Trim(); var regionName = ((string)t.SelectToken("regionCodes[0]") ?? "").Trim(); var nmck = ((string)t.SelectToken("price") ?? "").Trim().DelAllWhitespace(); nmck = nmck.GetDataFromRegex(">([\\d.]+)").DelAllWhitespace(); var tender = new TypeLotOnline { Href = href, PurNum = id, PurName = purName, DatePub = publicationDate, DateEnd = endDate, OrgName = orgName, OrgInn = orgInn, RegionName = regionName, Status = status, Nmck = nmck }; ParserTender(new TenderLotOnline("АО «Российский аукционный дом»", "https://market.lot-online.ru/", 274, tender)); }
public TenderLotOnline(string etpName, string etpUrl, int typeFz, TypeLotOnline tn) : base(etpName, etpUrl, typeFz) { _tn = tn; }