Skip to content

Commit

Permalink
Update selector.go
Browse files Browse the repository at this point in the history
修复获取html时候的bug
  • Loading branch information
musiclover789 authored Apr 5, 2024
1 parent b0d217f commit b1a54ab
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions script/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function getFirstChildNodeInfo(selector) {
nodeName: firstChildNode.nodeName,
nodeValue: firstChildNode.nodeValue,
textContent: firstChildNode.textContent,
htmlContent: firstChildNode.innerHTML,
htmlContent: firstChildNode.outerHTML,
cssSelector: getCssSelector(firstChildNode),
xpathSelector: getXpathSelector(firstChildNode)
};
Expand Down Expand Up @@ -169,7 +169,7 @@ function getLastChildNodeInfo(selector) {
nodeName: lastChildNode.nodeName,
nodeValue: lastChildNode.nodeValue,
textContent: lastChildNode.textContent,
htmlContent: lastChildNode.innerHTML,
htmlContent: lastChildNode.outerHTML,
cssSelector: getCssSelector(lastChildNode),
xpathSelector: getXpathSelector(lastChildNode)
};
Expand Down Expand Up @@ -224,7 +224,7 @@ function getNextSiblingNodeInfo(selector) {
nodeName: nextSiblingNode.nodeName,
nodeValue: nextSiblingNode.nodeValue,
textContent: nextSiblingNode.textContent,
htmlContent: nextSiblingNode.innerHTML,
htmlContent: nextSiblingNode.outerHTML,
cssSelector: getCssSelector(nextSiblingNode),
xpathSelector: getXpathSelector(nextSiblingNode)
};
Expand Down Expand Up @@ -280,7 +280,7 @@ function getPreviousSiblingNodeInfo(selector) {
nodeName: previousSiblingNode.nodeName,
nodeValue: previousSiblingNode.nodeValue,
textContent: previousSiblingNode.textContent,
htmlContent: previousSiblingNode.innerHTML,
htmlContent: previousSiblingNode.outerHTML,
cssSelector: getCssSelector(previousSiblingNode),
xpathSelector: getXpathSelector(previousSiblingNode)
};
Expand Down Expand Up @@ -336,7 +336,7 @@ function getParentNodeInfo(selector) {
nodeName: parentNode.nodeName,
nodeValue: parentNode.nodeValue,
textContent: parentNode.textContent,
htmlContent: parentNode.innerHTML,
htmlContent: parentNode.outerHTML,
cssSelector: getCssSelector(parentNode),
xpathSelector: getXpathSelector(parentNode)
};
Expand Down Expand Up @@ -369,7 +369,7 @@ function getNodeInfo(selector) {
nodeName: element.nodeName,
nodeValue: element.nodeValue,
textContent: element.textContent,
htmlContent: element.innerHTML,
htmlContent: element.outerHTML,
cssSelector: getCssSelector(element),
xpathSelector: getXpathSelector(element)
};
Expand Down Expand Up @@ -422,7 +422,7 @@ function getNodeInfo(node) {
nodeName: node.nodeName,
nodeValue: node.nodeValue,
textContent: node.textContent,
htmlContent: node.innerHTML,
htmlContent: node.outerHTML,
cssSelector: getCssSelector(node),
xpathSelector: getXpathSelector(node)
};
Expand Down

0 comments on commit b1a54ab

Please sign in to comment.