forked from advancedlogic/GoOse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
article.go
36 lines (33 loc) · 776 Bytes
/
article.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package goose
import (
"github.com/PuerkitoBio/goquery"
"gopkg.in/fatih/set.v0"
)
type Article struct {
Title string
CleanedText string
MetaDescription string
MetaLang string
MetaFavicon string
MetaKeywords string
CanonicalLink string
Domain string
TopNode *goquery.Selection
TopImage string
Tags *set.Set
Movies *set.Set
FinalUrl string
LinkHash string
RawHtml string
Doc *goquery.Document
//raw_doc
PublishDate string
AdditionalData map[string]string
Delta int64
}
//Simple ToString: it shows just the title
//TODO: add more fields and pretty print
func (article *Article) ToString() string {
out := article.Title
return out
}