public List <ManagementCompany> GetManagementCompanies(string urlRegion) { string content = _repository.LoadPage(urlRegion); Task <CompanyListInfo> task = _repository.GetListInfoAsync <CompanyListInfo>(content, "div.js__manageListCompTable"); task.Wait(); CompanyListInfo companyListInfo = task.Result; _repository.GetToken(urlRegion); DataResponse dr = _repository.LoadData(companyListInfo.GetLoadAll(), urlRegion, URL_MORE_COMPANIES); Task <List <ManagementCompany> > taskListCompany = GetCompaniesAsync(Base.Base64Decode(dr.DataHtml.Content)); taskListCompany.Wait(); return(taskListCompany.Result); }
public List <House> GetHouseManagementCompany(ManagementCompany company) { string url = DomInfoRepository.URL_SITE + company.Url; string content = _repository.LoadPage(url); if (company.CountHouse > 15) { Task <HouseListInfo> task = _repository.GetListInfoAsync <HouseListInfo>(content, "div.js__manageCompanyHousesTable"); task.Wait(); HouseListInfo houseListInfo = task.Result; _repository.GetToken(url); DataResponse dr = _repository.LoadData(houseListInfo.GetLoadAll(), url, URL_MORE_HOUSE); content = Base.Base64Decode(dr.DataHtml.Content); } Task <List <House> > taskListHouse = GetHouseAsync(content); taskListHouse.Wait(); return(taskListHouse.Result); }