0
I want to read information from an HTML page of a online radio. I have tried to read using Htmlagilitypack, but without success because the page in question I am working does not use Elementid, I imagine it is not a problem, however I do not know use the API and the examples I found needed to use the method Getelementbyid().
I need to receive two information from this page (Playing Now, Playing Next), and assign them to their respective variable. Preferably using native C#functions, however I have no problem using some API like Htmlagilitypack(Especially if the procedure is simplified).
Here is a print of the page I wish to realize Web Scraping.
The code I currently have is like this:
namespace Web_Scraping{
class SimplesWebScraping{
void Main()
{
//Realiza o download da página em String
var webClient = new WebClient();
string pagina = webClient.DownloadString("http://hts01.painelstream.net:9074/index.html?sid=1");
//Declara variáveis do tipo string para armazenar os dados/conteúdos extraidos no website.
string playingNow = string.Empty;
string playingNext = string.Empty;
//Realiza o Web_Scraping
//Como fazer isso?
//Escreve os dados extraídos
Console.Write("Reproduzindo Agora: " + playingNow);
Console.Write("Reprodução Seguinte: " + playingNext);
}
}
}
What is the best way to perform this procedure, can anyone show me example codes for this action? I tell you already Thanks for the help!
The question was better answered in another topic. https://answall.com/questions/302606/comort-coletar-dados-de-uma-pagina-web
– Guilherme Lima