parser

package
v0.0.0-...-650ccfd Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertTwitterTime

func ConvertTwitterTime(timestring string) time.Time

func GetTweetUrl

func GetTweetUrl(tweet twitter.Tweet) string

func ParseTweetText

func ParseTweetText(tweet twitter.Tweet) string

Parse the text, identify twitter shortened URLs and replace them

Types

type Content

type Content struct {
	URL                 string
	HTMLTitle           string
	TwitterTitle        string
	OGTitle             string
	HDLTitle            string
	Description         string
	OGDescription       string
	LPDescription       string
	TwitterDescription  string
	TwitterPlayer       string
	TwitterPlayerWidth  string
	TwitterPlayerHeight string
	OGVideoURL          string
	OGVideoWidth        string
	OGVideoHeight       string
}

TODO: there is also "<link itemprop=embedURL ..." but its much more

difficult to parse since the hight & width value can occure multiple
times if you look at the youtube html code

type ReplacementList

type ReplacementList []replaceObject

func (ReplacementList) Len

func (dl ReplacementList) Len() int

func (ReplacementList) Less

func (dl ReplacementList) Less(i, j int) bool

func (ReplacementList) Swap

func (dl ReplacementList) Swap(i, j int)

Jump to

Keyboard shortcuts

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