Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/h12w/html-query
Browse files Browse the repository at this point in the history
  • Loading branch information
Hǎiliàng Wáng committed Dec 12, 2016
2 parents a7c392e + 1ce163c commit 7375300
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions expr/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ func GetText(n *html.Node) *string {
return nil
}

func GetSrc(n *html.Node) *string {
if n == nil {
return nil
}
return GetAttr(n, "src")
}

func GetHref(n *html.Node) *string {
if n == nil {
return nil
Expand Down

0 comments on commit 7375300

Please sign in to comment.