Documentation ¶
Overview ¶
Package readpage fetches information from a web page.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoTitleFound = errors.New("no title found in the document") ErrTimeout = errors.New("request timed out") )
Functions ¶
func FindTitle ¶
FindTitle finds a <title> in the document.
If there is no title, or the title is empty string, ErrNoTitleFound is returned. If any other error occurred, it is returned.
func IsThisValidRepost ¶
func IsThisValidRepost(report activities.AnnounceReport) (validRepost bool, err error)
Types ¶
type FoundData ¶
type FoundData struct { // PostName is the first p-name found. PostName string // BookmarkOf is the first u-bookmark-of found. Must be a valid URL. BookmarkOf string // RepostOf is the first u-repost-of found. Must be a valid URL. RepostOf string // Tags are all p-category found. Tags []string // Mycomarkup is the Mycomarkup text. It is fetched with a second request. Mycomarkup string // IsHFeed is true if the document has an h-feed somewhere in the beginning. You don't repost h-feed:s. IsHFeed bool // contains filtered or unexported fields }
FoundData is all data found in a document. Specific fields are set iff you wish for them.
func FindDataForMyRepost ¶
FindDataForMyRepost finds data relevant for us to make a repost.
Click to show internal directories.
Click to hide internal directories.