onionscan/utils/html_parsing.go

13 lines
190 B
Go
Raw Permalink Normal View History

package utils
import "golang.org/x/net/html"
func GetAttribute(tag html.Token, name string) string {
for _, a := range tag.Attr {
if a.Key == name {
return a.Val
}
}
return ""
}