Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ classifiers = [
]
dependencies = [
"appdirs==1.4.4",
"beautifulsoup4==4.12.3",
"beautifulsoup4==4.13.3",
"charset-normalizer==3.4.1",
"cssutils==2.11.1",
"dhash==1.4",
Expand Down
2 changes: 1 addition & 1 deletion thug/DOM/DFT.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ def check_small_element(self, element, tagname):

try:
value = int(attrs[key].split("px")[0])
except Exception: # pylint:disable=broad-except
except Exception: # pragma: no cover,pylint:disable=broad-except
value = None

if not value:
Expand Down
2 changes: 1 addition & 1 deletion thug/DOM/W3C/Core/Document.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def getElementsByTagName(self, tagname):
from .NodeList import NodeList

if tagname in ("*",):
return NodeList(self.doc, self.doc.find_all(string=False))
return NodeList(self.doc, self.doc.find_all())

return NodeList(self.doc, self.doc.find_all(tagname.lower()))

Expand Down
4 changes: 2 additions & 2 deletions thug/DOM/W3C/Core/Node.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def setNodeValue(self, value): # pragma: no cover
nodeValue = property(getNodeValue, setNodeValue)

def getTextContent(self):
return self.tag.string
return str(self.tag.string)

def setTextContent(self, value):
self.tag.string = str(value)
Expand Down Expand Up @@ -429,7 +429,7 @@ def normalize(self):
index += 1
continue

child.tag.string = child.innerText + sibling.innerText
child.tag.string.replace_with(child.innerText + sibling.innerText)
self.removeChild(sibling)

# Introduced in DOM Level 2
Expand Down
2 changes: 1 addition & 1 deletion thug/DOM/W3C/HTML/HTMLBodyElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def getInnerHTML(self):
for tag in self.tag.contents:
try:
html.write(str(tag))
except Exception as e: # pylint:disable=broad-except
except Exception as e: # pragma: no cover,pylint:disable=broad-except
log.warning("[HTMLBodyElement] innerHTML warning: %s", str(e))

return html.getvalue()
Expand Down
2 changes: 1 addition & 1 deletion thug/DOM/W3C/HTML/HTMLDocument.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def getElementsByName(self, elementName):
def _all(self):
from .HTMLAllCollection import HTMLAllCollection

s = list(self.doc.find_all(string=False))
s = list(self.doc.find_all())
return HTMLAllCollection(self.doc, s)

@property
Expand Down
Loading