README updated according to new package names
This commit is contained in:
parent
0eda056065
commit
fb5b4e3406
17
README.md
17
README.md
@ -40,7 +40,7 @@ func main() {
|
|||||||
geziyor.NewGeziyor(&geziyor.Options{
|
geziyor.NewGeziyor(&geziyor.Options{
|
||||||
StartURLs: []string{"http://quotes.toscrape.com/"},
|
StartURLs: []string{"http://quotes.toscrape.com/"},
|
||||||
ParseFunc: quotesParse,
|
ParseFunc: quotesParse,
|
||||||
Exporters: []geziyor.Exporter{exporter.JSON{}},
|
Exporters: []geziyor.Exporter{export.JSON{}},
|
||||||
}).Start()
|
}).Start()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,12 +111,15 @@ You can add [Extractor](https://godoc.org/github.com/geziyor/geziyor/extractor)
|
|||||||
geziyor.NewGeziyor(&geziyor.Options{
|
geziyor.NewGeziyor(&geziyor.Options{
|
||||||
StartURLs: []string{"https://www.theverge.com/2019/6/27/18760384/facebook-libra-currency-cryptocurrency-money-transfer-bank-problems-india-china"},
|
StartURLs: []string{"https://www.theverge.com/2019/6/27/18760384/facebook-libra-currency-cryptocurrency-money-transfer-bank-problems-india-china"},
|
||||||
Extractors: []geziyor.Extractor{
|
Extractors: []geziyor.Extractor{
|
||||||
&extractor.Text{Name: "title", Selector: ".c-page-title"},
|
&extract.HTML{Name: "entry_html", Selector: ".c-entry-hero__content"},
|
||||||
&extractor.Text{Name: "byline", Selector: ".c-byline__item:nth-child(1) > a"},
|
&extract.Text{Name: "title", Selector: ".c-page-title"},
|
||||||
&extractor.Text{Name: "summary", Selector: ".c-entry-summary"},
|
&extract.OuterHTML{Name: "title_html", Selector: ".c-page-title"},
|
||||||
&extractor.Text{Name: "content", Selector: ".c-entry-content"},
|
&extract.Text{Name: "author", Selector: ".c-byline__item:nth-child(1) > a"},
|
||||||
|
&extract.Attr{Name: "author_url", Selector: ".c-byline__item:nth-child(1) > a", Attr: "href"},
|
||||||
|
&extract.Text{Name: "summary", Selector: ".c-entry-summary"},
|
||||||
|
&extract.Text{Name: "content", Selector: ".c-entry-content"},
|
||||||
},
|
},
|
||||||
Exporters: []geziyor.Exporter{&exporter.JSON{}},
|
Exporters: []geziyor.Exporter{&export.JSON{}},
|
||||||
}).Start()
|
}).Start()
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -154,7 +157,7 @@ geziyor.NewGeziyor(&geziyor.Options{
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
Exporters: []geziyor.Exporter{&exporter.JSON{}},
|
Exporters: []geziyor.Exporter{&export.JSON{}},
|
||||||
}).Start()
|
}).Start()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user