Attribute extractor added. HTML extractor added. Outer HTML Extractor added.

exporter package renamed to export, extractor package renamed to extract for simplicity.
This commit is contained in:
Musab Gültekin
2019-06-30 22:20:17 +03:00
parent 7c383b175f
commit 0eda056065
12 changed files with 115 additions and 31 deletions

20
export/pprint.go Normal file
View File

@ -0,0 +1,20 @@
package export
import (
"encoding/json"
"fmt"
)
// PrettyPrint logs exported data to console as pretty printed
type PrettyPrint struct{}
// Export logs exported data to console as pretty printed
func (*PrettyPrint) Export(exports chan interface{}) {
for res := range exports {
dat, err := json.MarshalIndent(res, "", " ")
if err != nil {
continue
}
fmt.Println(string(dat))
}
}