func (n *Name) Parse(page []byte) error {
	s := nameIDRE.FindSubmatch(page)
	if s == nil {
		return NewErrParse("id")
	}
	n.ID = string(s[1])
	n.URL = fmt.Sprintf(nameURL, n.ID)
	s = nameFullNameRE.FindSubmatch(page)
	if s == nil {
		return NewErrParse("full name")
	}
	if len(s[1]) == 0 {
		return NewErrParse("full name empty")
	}
	n.FullName = decode(string(s[1]))
	return nil
}
Parse parses a Name from its page.
package imdb
import (
	"fmt"
	"io/ioutil"
	"net/http"
	"regexp"
)
type Name struct {
	ID       string `json:",omitempty"`
	URL      string `json:",omitempty"`
	FullName string `json:",omitempty"`
}
func (n *Name) String() string {
	return fmt.Sprintf("IMDb %s: %s", n.ID, n.FullName)
}
var nmRE = regexp.MustCompile(`^nm\d+$`)
const nameURL = "https://www.imdb.com/name/%s"
func NewName(c *http.Client, id string) (*Name, error) {
	if !nmRE.MatchString(id) {
		return nil, ErrInvalidID
	}
	resp, err := c.Get(fmt.Sprintf(nameURL, id))
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	page, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, err
	}
	n := Name{}
	if err := n.Parse(page); err != nil {
		return nil, err
	}
	return &n, nil
}
var (
	nameIDRE       = regexp.MustCompile(`<link rel="canonical" href="https://www.imdb.com/name/(nm\d+)/"`)
	nameFullNameRE = regexp.MustCompile(`<meta property=.og:title. content="(.*?)( - IMDb)?"`)
)