public WebResponse(IWebUri webUri, IRepeat repeat, IRequest request, ITranslateResponse translateResponse) { WebUri = webUri; Repeat = repeat; Request = request; TranslateResponse = translateResponse; }
public static IWebResponse Create(IWebUri webUri, IRepeat repeat = null, IRequest request = null, ITranslateResponse translateResponse = null) { var requestLocal = request ?? new Request(webUri); var repeatLocal = repeat ?? new Repeat(requestLocal); var translateResponseLocal = translateResponse ?? new HtmlDocTranslateResponse(); return(new WebResponse(webUri, repeatLocal, requestLocal, translateResponseLocal)); }
public void Process(HtmlDocument htmlDoc, IWebUri webUri) { SearchRows = new List <SearchRowModel>(); var lis = GetLisSubDetails(htmlDoc); foreach (var li in lis) { var subDetailWebSites = CreateSubDetailsList(); foreach (var subDetail in subDetailWebSites) { subDetail.Process(li, webUri); } if (TryCreateModel(subDetailWebSites, out var model)) { SearchRows.Add(model); } } }
public void Process(HtmlDocument htmlDoc, IWebUri webUri) { var span = htmlDoc.DocumentNode.SelectSingleNode("//span[@itemprop='timeRequired']"); Duration = span?.GetAttributes("data-duration")?.FirstOrDefault()?.Value; }
public HtmlDocWebSite(IWebUri webUri, IWebResponse webResponse = null) { this.webUri = webUri; this.webResponse = webResponse ?? WebResponseBuilder.Create(webUri); }
public void Process(HtmlNode htmlNode, IWebUri webUri) { Title = htmlNode.SelectSingleNode(".//h2[@class='filmPreview__title']")?.InnerHtml; }
public void Process(HtmlDocument htmlDoc, IWebUri webUri) { var div = htmlDoc.DocumentNode.SelectSingleNode("//div[@itemprop='genre']"); Genre = div.InnerText; }
public void Process(HtmlDocument htmlDoc, IWebUri webUri) { var h1 = htmlDoc.DocumentNode.SelectSingleNode("//h1[contains(@class,'filmCoverSection__title')]"); Title = h1?.InnerText; }
public void Process(HtmlDocument htmlDoc, IWebUri webUri) { var a = htmlDoc.DocumentNode.SelectSingleNode("//a[@itemprop='director']"); Directior = a?.InnerText?.Trim(); }
public void Process(HtmlNode htmlNode, IWebUri webUri) { Year = htmlNode.SelectSingleNode(".//div[@class='filmPreview__year']")?.InnerText; }
public void Process(HtmlNode htmlNode, IWebUri webUri) { Release = htmlNode.SelectSingleNode(".//div[@class='filmPreview__release']")?.GetAttributes("data-release")?.FirstOrDefault()?.Value; }
public void Process(HtmlNode htmlNode, IWebUri webUri) { Duration = htmlNode.SelectSingleNode(".//div[@class='filmPreview__filmTime']")?.GetAttributes("data-duration")?.FirstOrDefault()?.Value; }
public Request(IWebUri uri) { this.uri = uri; }
public void Process(HtmlNode htmlNode, IWebUri webUri) { Link = webUri.Host + htmlNode.SelectSingleNode(".//a[@class='filmPreview__link']")?.GetAttributes("href")?.FirstOrDefault()?.Value; }
public void Process(HtmlDocument htmlDoc, IWebUri webUri) { var span = htmlDoc.DocumentNode.SelectSingleNode("//span[@itemprop='ratingValue']"); Rating = span?.InnerText?.Trim(); }