skip to Main Content
(31) 98739-9637

Como extrai imagens de um site

using HtmlAgilityPack; public static List GetImagesFromUrl(string url) { var web = new HtmlWeb(); var doc = web.Load(url); var images = new List(); foreach (var img in doc.DocumentNode.Descendants("img")) { var src = img.Attributes["src"]?.Value; if (!string.IsNullOrEmpty(src)) { images.Add(src); } } return images;…

Saiba mais

Não é possível consumir o serviço com escopo do singleton IHostedService

Hoje neste artigo, abordaremos abaixo os aspectos, descrição do problema Resolução descrição do problema   ASP.NET Core usando IHostedService dá erro de tempo de execução,   InvalidOperationException : Erro ao validar o descritor de serviço 'ServiceType: Microsoft.Extensions.Hosting.IHostedService Tempo de vida: Singleton ImplementationType: kafka_api_producer_consumer.TheCodeBuzzConsumer':…

Saiba mais

Recortar imagem com c#

Description Downsizing a large image can cause oddly sampled pixels in the top rows of pixels (I only noticed it in the top rows at least). I tested multiple samplers. All of them displayed similar results. Steps to Reproduce using…

Saiba mais

Forçar o redicionamento para https

<system.webServer> <rewrite> <rules> <clear /> <rule name="Redirect to https" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" url="https://seudominio.com.br" redirectType="Permanent" appendQueryString="false" /> </rule> </rules> </rewrite> </system.webServer>  

Saiba mais
Back To Top