webprev

package module
v0.1.2-0...-19a1913 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2020 License: MIT Imports: 4 Imported by: 0

README

webprev Go Report Card Build Status made-with-Go

webprev package provides easy access to website previews

Funcs

  • Preview(url) will make request by given url, parse html amd return WebPreview struct.

example

go get -u github.com/lalabuy948/webprev

Documentation

Overview

Package webprev provides easy extraction of website previews. Generic, Facebook and Twitter cards.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebCard

type WebCard struct {
	Title       string
	Description string
	ImgURL      string
}

WebCard contains title, description and image url.

type WebPreview

type WebPreview struct {
	Generic   WebCard
	OpenGraph WebCard
	Twitter   WebCard
}

WebPreview contains 3 web preview cards - Generic/default, OpenGraph/Facebook and Twitter.

func Preview

func Preview(url string) (webPreview WebPreview, err error)

Preview makes request by given url, parse html amd return WebPreview struct.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL