Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (31 sloc) 1.11 KB

[Golang] Get HTML Title via net/html Package

Date: 2016-05-10T21:53+08:00
tags:Go, Golang, DOM, Web Scrape, Go net/html, html
category:Go
summary:Get HTML title via net/html package in Go programming language.
adsu:yes

Introduction

Get HTML title via net/html package in Golang (Go programming language).

Install net/html Package

$ go get -u golang.org/x/net/html

Source Code

.. show_github_file:: siongui userpages content/code/go-title-net-html/title.go
.. adsu:: 2

Usage:

.. show_github_file:: siongui userpages content/code/go-title-net-html/title_test.go
.. adsu:: 3


Tested on: Ubuntu Linux 16.04, Go 1.6.2.


References:

[1]html - GoDoc
[2][Golang] Get HTML Title via goquery