built-in genuine image checker based on byte headers
This commit is contained in:
parent
f90af3b076
commit
f964c7442f
|
@ -21,6 +21,8 @@ type Receiver struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
titleRegexp = regexp.MustCompile(`<title>(.*?)<\/title>`)
|
||||||
|
|
||||||
errPicUnableToDownload = errors.New("Unable to download author picture")
|
errPicUnableToDownload = errors.New("Unable to download author picture")
|
||||||
errPicNoRealImage = errors.New("Downloaded author picture is not a real image")
|
errPicNoRealImage = errors.New("Downloaded author picture is not a real image")
|
||||||
errPicUnableToSave = errors.New("Unable to save downloaded author picture")
|
errPicUnableToSave = errors.New("Unable to save downloaded author picture")
|
||||||
|
@ -86,10 +88,6 @@ func (recv *Receiver) parseBodyAsIndiewebSite(hEntry *microformats.Microformat,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
|
||||||
titleRegexp = regexp.MustCompile(`<title>(.*?)<\/title>`)
|
|
||||||
)
|
|
||||||
|
|
||||||
func (recv *Receiver) parseBodyAsNonIndiewebSite(body string, wm mf.Mention) *mf.IndiewebData {
|
func (recv *Receiver) parseBodyAsNonIndiewebSite(body string, wm mf.Mention) *mf.IndiewebData {
|
||||||
title := nonIndiewebTitle(body, wm)
|
title := nonIndiewebTitle(body, wm)
|
||||||
return &mf.IndiewebData{
|
return &mf.IndiewebData{
|
||||||
|
|
Loading…
Reference in New Issue