p1: /v2/scrape, /v1/fetch, auth, CLI, contract tests
Single Fetcher.Fetch on the Guard that holds DenyPrefixes. skipTlsVerification is ignored. No 502. keys add writes the secret only to --out. Release binary has no -test-allow-prefix.
This commit is contained in:
Generated
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
package domutils
|
||||
|
||||
import (
|
||||
"github.com/JohannesKaufmann/dom"
|
||||
"golang.org/x/net/html"
|
||||
)
|
||||
|
||||
func getNextTextNode(startNode *html.Node) *html.Node {
|
||||
node := dom.GetNextNeighborNodeExcludingOwnChild(startNode)
|
||||
|
||||
for node != nil {
|
||||
if node.Type == html.TextNode {
|
||||
return node
|
||||
}
|
||||
|
||||
if dom.NodeName(node) == "span" {
|
||||
// A span has no special meaning. So we just skip it...
|
||||
node = dom.GetNextNeighborNode(node)
|
||||
continue
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func getPrevTextNode(startNode *html.Node) *html.Node {
|
||||
node := dom.GetPrevNeighborNodeExcludingOwnChild(startNode)
|
||||
|
||||
for node != nil {
|
||||
if node.Type == html.TextNode {
|
||||
return node
|
||||
}
|
||||
|
||||
if dom.NodeName(node) == "span" {
|
||||
// A span has no special meaning. So we just skip it...
|
||||
node = dom.GetPrevNeighborNode(node)
|
||||
continue
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user