Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public override async Task <string> GetMangaName()
        {
            var scrappingBag = await _angleScrapService.GetScrappingBagWithTextContent(SiteSelector.Url, SiteSelector.NameSelector);

            return(_replace.Content(scrappingBag.TextContent, "", "[?|:|\"|\\n|/|/|-| ]"));
        }