- Notifications
You must be signed in to change notification settings - Fork0
Html Content / Article Extractor in Golang
License
fresh8/GoOse
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
HTML Content / Article Extractor in Golang
This is a golang port of "Goose" originaly licensed to Gravity.comunder one or more contributor license agreements. See the NOTICE filedistributed with this work for additional informationregarding copyright ownership.
Golang port was written by Antonio Linari
Gravity.com licenses this fileto you under the Apache License, Version 2.0 (the "License");you may not use this file except in compliancewith the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
go get github.com/advancedlogic/GoOse
package mainimport ("github.com/advancedlogic/GoOse")funcmain() {g:=goose.New()article,_:=g.ExtractFromURL("http://edition.cnn.com/2012/07/08/opinion/banzi-ted-open-source/index.html")println("title",article.Title)println("description",article.MetaDescription)println("keywords",article.MetaKeywords)println("content",article.CleanedText)println("url",article.FinalURL)println("top image",article.TopImage)}
This application is written in GO language, please refere to the guides inhttps://golang.org for getting started.
This project include a Makefile that allows you to test and build the project with simple commands.To see all available options:
makehelp
Before committing the code, please check if it passes all tests using
make depsmake qa
- better organize code
- improve "xpath" like queries
- add other image extractions techniques (imagemagick)
@Martin Angers for goquery@Fatih Arslan for setGoLang team for the amazing language and net/html
About
Html Content / Article Extractor in Golang
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- HTML95.8%
- Go4.1%
- Other0.1%