public async Task <ScrappingBag> GetScrappingBagWithLink(string url, string selector) { ScrappingBag scrappingBag = new(); var hrefList = await GetElements(url, selector); var element = hrefList.FirstOrDefault(); if (element is null) { return(scrappingBag); } var text = _replace.Content(((IHtmlAnchorElement)element)?.PathName, "", "[*|?|:|\"|\\n|/|/]"); scrappingBag.SetUrlAndText(element?.GetAttribute("href"), text); return(scrappingBag); }
public override async Task <string> GetMangaName() { var scrappingBag = await _angleScrapService.GetScrappingBagWithTextContent(SiteSelector.Url, SiteSelector.NameSelector); return(_replace.Content(scrappingBag.TextContent, "", "[?|:|\"|\\n|/|/|-| ]")); }