Extractors implemented. Exporters name simplified. README Updated for extracting data. Removed go 1.11 support

This commit is contained in:
Musab Gültekin
2019-06-28 13:00:30 +03:00
parent 679fd8ab7a
commit b000581c3d
13 changed files with 138 additions and 27 deletions

14
extractor/text.go Normal file
View File

@ -0,0 +1,14 @@
package extractor
import "github.com/PuerkitoBio/goquery"
// Text extracts texts from selected nodes
type Text struct {
Name string
Selector string
}
// Extract extracts texts from selected nodes
func (e *Text) Extract(doc *goquery.Document) interface{} {
return map[string]string{e.Name: doc.Find(e.Selector).Text()}
}