Atualizações Go Open Graph Scraper
Olá, recentemente iniciei um projeto de scraper para dados da open graph de sites com go https://www.tabnews.com.br/souzax/open-graph-scraper-com-go, e agora criei um novo repo que é uma api para consulta dos mesmo dados só que por http mesmo ao invés de usar o terminal que nem eu estava testando com o pacote em go.
Como rodar?
git clone https://github.com/pedrosouza458/go-open-graph-scraper-api
go mod tidy
go run .
Agora é só acessar a porta 8080
http://localhost:8080/websites
Guia:
Request
curl 'http://localhost:8080/websites?url=https://github.com/pedrosouza458/go-open-graph-scraper'
Response
{
"Descpription": "Go-Open-Graph-Scraper is a go package to get metadata from websites easily, also returning formatted logos and names for any compatible website. - pedrosouza458/go-open-graph-scraper",
"Img": "https://opengraph.githubassets.com/50e5a16d77647cd090085c7d7daacdac42b22d8109d2095fe22cce2606e345f1/pedrosouza458/go-open-graph-scraper",
"Logo": "https://utfs.io/f/503dc239-2ada-4caf-9f5a-ef92a778c194-n8l1zp.png",
"Name": "github",
"Title": "GitHub - pedrosouza458/go-open-graph-scraper: Go-Open-Graph-Scraper is a go package to get metadata from websites easily, also returning formatted logos and names for any compatible website."
}