onionscan/utils/html_parsing.go

13 lines
190 B
Go

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 ""
}