id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12,800 | NodeType.py | buffer_thug/thug/DOM/W3C/Core/NodeType.py | #!/usr/bin/env python
class NodeType:
ELEMENT_NODE = 1
ATTRIBUTE_NODE = 2
TEXT_NODE = 3
CDATA_SECTION_NODE = 4
ENTITY_REFERENCE_NODE = 5
ENTITY_NODE = 6
PROCESSING_INSTRUCTION_NODE = 7
COMMENT_NODE = 8
DOCUMENT_NODE = 9
DOCUMENT_TYPE_NODE = 10
DOCUMENT_FRAGMENT_NODE = 11
... | 341 | Python | .py | 14 | 19.785714 | 35 | 0.664615 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,801 | Node.py | buffer_thug/thug/DOM/W3C/Core/Node.py | #!/usr/bin/env python
import copy
import logging
from thug.DOM.JSClass import JSClass
from thug.DOM.W3C.Events.EventTarget import EventTarget
from .abstractmethod import abstractmethod
from .DOMException import DOMException
from .NodeType import NodeType
log = logging.getLogger("Thug")
class Node(JSClass, EventTa... | 14,383 | Python | .py | 359 | 30.454039 | 85 | 0.629451 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,802 | Element.py | buffer_thug/thug/DOM/W3C/Core/Element.py | #!/usr/bin/env python
import logging
import random
from urllib.parse import urlsplit
from thug.DOM.W3C.Style.CSS.ElementCSSInlineStyle import ElementCSSInlineStyle
from .DOMException import DOMException
from .Node import Node
from .ClassList import ClassList
log = logging.getLogger("Thug")
FF_STYLES = (
(27,... | 9,703 | Python | .py | 237 | 29.970464 | 94 | 0.599446 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,803 | CharacterData.py | buffer_thug/thug/DOM/W3C/Core/CharacterData.py | #!/usr/bin/env python
from .Node import Node
from .DOMException import DOMException
class CharacterData(Node):
def __init__(self, doc, tag):
tag._node = self
Node.__init__(self, doc, tag)
def getData(self):
return self._data
def setData(self, data):
self._data = data
... | 1,245 | Python | .py | 34 | 28.941176 | 72 | 0.617893 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,804 | DocumentType.py | buffer_thug/thug/DOM/W3C/Core/DocumentType.py | #!/usr/bin/env python
import logging
import re
from .Node import Node
from .NamedNodeMap import NamedNodeMap
log = logging.getLogger("Thug")
class DocumentType(Node):
RE_DOCTYPE = re.compile(r"^(\w+)", re.M + re.S)
def __init__(self, doc, tag):
Node.__init__(self, doc, tag)
self.__init_doc... | 1,512 | Python | .py | 51 | 23.294118 | 64 | 0.645429 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,805 | Comment.py | buffer_thug/thug/DOM/W3C/Core/Comment.py | #!/usr/bin/env python
from .CharacterData import CharacterData
class Comment(CharacterData):
def __init__(self, doc, tag):
self.setNodeValue(tag)
CharacterData.__init__(self, doc, tag)
@property
def nodeName(self):
return "#comment"
@property
def nodeType(self):
... | 565 | Python | .py | 18 | 25 | 52 | 0.674721 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,806 | Entity.py | buffer_thug/thug/DOM/W3C/Core/Entity.py | #!/usr/bin/env python
from .Node import Node
class Entity(Node): # pragma: no cover
@property
def publicId(self):
return None
@property
def systemId(self):
return None
@property
def notationName(self):
return None
@property
def nodeName(self):
retur... | 458 | Python | .py | 21 | 15.857143 | 39 | 0.638695 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,807 | abstractmethod.py | buffer_thug/thug/DOM/W3C/Core/abstractmethod.py | #!/usr/bin/env python
import sys
class abstractmethod:
def __init__(self, func):
self.func = func
def __call__(self, *args, **kwds): # pragma: no cover
func_name = (
self.func.__name__ if sys.version_info.major >= 3 else self.func.func_name
)
raise NotImplemented... | 362 | Python | .py | 10 | 29.6 | 86 | 0.612069 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,808 | EntityReference.py | buffer_thug/thug/DOM/W3C/Core/EntityReference.py | #!/usr/bin/env python
import bs4
from .Node import Node
class EntityReference(Node):
def __init__(self, doc, name):
tag = bs4.BeautifulSoup(f"&{name};", "lxml")
Node.__init__(self, doc, tag)
@property
def name(self):
return self.tag.string.encode("utf8")
@property
def n... | 501 | Python | .py | 19 | 20.526316 | 52 | 0.635021 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,809 | CDATASection.py | buffer_thug/thug/DOM/W3C/Core/CDATASection.py | #!/usr/bin/env python
from .Text import Text
class CDATASection(Text):
@property
def nodeName(self):
return "#cdata-section"
@property
def nodeType(self):
from .NodeType import NodeType
return NodeType.CDATA_SECTION_NODE
| 266 | Python | .py | 10 | 21.1 | 42 | 0.693227 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,810 | __init__.py | buffer_thug/thug/DOM/W3C/Core/__init__.py | __all__ = [
"Attr",
"CDATASection",
"CharacterData",
"Comment",
"DOMException",
"DOMImplementation",
"Document",
"DocumentFragment",
"DocumentType",
"Element",
"Entity",
"EntityReference",
"NamedNodeMap",
"Node",
"NodeList",
"Notation",
"ProcessingInst... | 939 | Python | .py | 37 | 22.378378 | 56 | 0.774444 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,811 | Text.py | buffer_thug/thug/DOM/W3C/Core/Text.py | #!/usr/bin/env python
from .CharacterData import CharacterData
class Text(CharacterData):
def __init__(self, doc, tag):
self.data = tag
CharacterData.__init__(self, doc, tag)
def splitText(self, offset):
newNode = self.doc.createTextNode(self.data[offset:])
self.data = self.d... | 804 | Python | .py | 24 | 26.333333 | 67 | 0.66276 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,812 | NamedNodeMap.py | buffer_thug/thug/DOM/W3C/Core/NamedNodeMap.py | #!/usr/bin/env python
from thug.DOM.JSClass import JSClass
class NamedNodeMap(JSClass):
def __init__(self, doc, tag):
self.doc = doc
self.tag = tag
def __len__(self):
return self.length
def __getattr__(self, key):
return self.getNamedItem(key)
def __getitem__(self, ... | 1,295 | Python | .py | 39 | 24.974359 | 54 | 0.606624 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,813 | ClassList.py | buffer_thug/thug/DOM/W3C/Core/ClassList.py | #!/usr/bin/env python
import logging
from thug.DOM.JSClass import JSClass
log = logging.getLogger("Thug")
class ClassList(JSClass):
def __init__(self, tag):
self.tag = tag
self.__init_classlist_personality()
self.__init_class_list()
def __init_classlist_personality(self):
i... | 3,760 | Python | .py | 118 | 22.059322 | 58 | 0.540383 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,814 | ProcessingInstruction.py | buffer_thug/thug/DOM/W3C/Core/ProcessingInstruction.py | #!/usr/bin/env python
from .Node import Node
class ProcessingInstruction(Node):
def __init__(self, doc, target, tag):
self._target = target
self.data = str(tag)
Node.__init__(self, doc, tag)
@property
def target(self):
return self._target
@property
def nodeName(... | 507 | Python | .py | 19 | 20.421053 | 47 | 0.6375 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,815 | Attr.py | buffer_thug/thug/DOM/W3C/Core/Attr.py | #!/usr/bin/env python
import bs4
from .Node import Node
class Attr(Node):
_value = ""
def __init__(self, doc, parent, attr):
self.doc = doc
self.parent = parent
self.attr = attr
tag = bs4.Tag(parser=self.doc, name="attr")
Node.__init__(self, doc, tag)
self.... | 2,172 | Python | .py | 72 | 21.930556 | 57 | 0.591502 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,816 | DOMException.py | buffer_thug/thug/DOM/W3C/Core/DOMException.py | #!/usr/bin/env python
from thug.DOM.JSClass import JSClass
class DOMException(RuntimeError, JSClass):
# ExceptionCode
INDEX_SIZE_ERR = (
1 # If index or size is negative, or greater than the allowed value
)
DOMSTRING_SIZE_ERR = (
2 # If the specified range of text does not fit into ... | 1,893 | Python | .py | 39 | 42.692308 | 132 | 0.685235 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,817 | NodeList.py | buffer_thug/thug/DOM/W3C/Core/NodeList.py | #!/usr/bin/env python
import logging
from thug.DOM.JSClass import JSClass
log = logging.getLogger("Thug")
class NodeList(JSClass):
def __init__(self, doc, nodes):
self.doc = doc
self.nodes = nodes
def __len__(self):
return self.length
def __getitem__(self, key):
return... | 617 | Python | .py | 21 | 22.428571 | 80 | 0.616695 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,818 | DOMImplementation.py | buffer_thug/thug/DOM/W3C/Core/DOMImplementation.py | #!/usr/bin/env python
import logging
import bs4
from lxml.html import builder as E
from lxml.html import tostring
from thug.DOM.W3C import HTML
log = logging.getLogger("Thug")
class DOMImplementation(HTML.HTMLDocument):
features = (
("core", "1.0"),
("core", "2.0"),
("core", None),
... | 4,988 | Python | .py | 134 | 28.291045 | 83 | 0.609398 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,819 | HTMLOListElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLOListElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
class HTMLOListElement(HTMLElement):
compact = bool_property("compact")
start = attr_property("start", int)
type = attr_property("type")
def __init__(self, doc... | 373 | Python | .py | 10 | 33.5 | 44 | 0.724234 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,820 | HTMLBaseFontElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLBaseFontElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLBaseFontElement(HTMLElement):
color = attr_property("color")
face = attr_property("face")
size = attr_property("size", int)
def __init__(self, doc, tag):
HTMLElement.__init__(self, d... | 329 | Python | .py | 9 | 32.444444 | 44 | 0.705696 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,821 | HTMLLabelElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLLabelElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .form_property import form_property
class HTMLLabelElement(HTMLElement):
accessKey = attr_property("accesskey")
form = form_property()
htmlFor = attr_property("for")
def __init__(self, doc, tag):... | 366 | Python | .py | 10 | 32.8 | 44 | 0.730114 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,822 | HTMLObjectElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLObjectElement.py | #!/usr/bin/env python
import logging
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
from .form_property import form_property
log = logging.getLogger("Thug")
class HTMLObjectElement(HTMLElement):
code = attr_property("code")
align = att... | 2,550 | Python | .py | 70 | 28.342857 | 70 | 0.616667 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,823 | HTMLHeadingElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLHeadingElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLHeadingElement(HTMLElement):
align = attr_property("align")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 257 | Python | .py | 7 | 32.857143 | 44 | 0.727642 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,824 | HTMLLIElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLLIElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLLIElement(HTMLElement):
type = attr_property("type")
value = attr_property("value", int)
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 290 | Python | .py | 8 | 32.25 | 44 | 0.708633 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,825 | HTMLAudioElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLAudioElement.py | #!/usr/bin/env python
import logging
from .HTMLMediaElement import HTMLMediaElement
log = logging.getLogger("Thug")
class HTMLAudioElement(HTMLMediaElement):
def __init__(self, doc, tag):
HTMLMediaElement.__init__(self, doc, tag)
| 247 | Python | .py | 7 | 31.857143 | 49 | 0.753191 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,826 | HTMLFormElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLFormElement.py | #!/usr/bin/env python
import logging
from .HTMLElement import HTMLElement
from .HTMLFormControlsCollection import HTMLFormControlsCollection
from .attr_property import attr_property
log = logging.getLogger("Thug")
class HTMLFormElement(HTMLElement):
name = attr_property("name")
acceptCharset = attr_propert... | 1,689 | Python | .py | 39 | 35.897436 | 84 | 0.667482 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,827 | HTMLScriptElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLScriptElement.py | #!/usr/bin/env python
import logging
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
from .text_property import text_property
log = logging.getLogger("Thug")
class HTMLScriptElement(HTMLElement):
_async = bool_property("async", readonly=Tru... | 963 | Python | .py | 28 | 29 | 64 | 0.667749 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,828 | AudioTrackList.py | buffer_thug/thug/DOM/W3C/HTML/AudioTrackList.py | #!/usr/bin/env python
from .HTMLCollection import HTMLCollection
class AudioTrackList(HTMLCollection):
def __init__(self, doc, tracks):
HTMLCollection.__init__(self, doc, tracks)
| 194 | Python | .py | 5 | 34.8 | 50 | 0.736559 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,829 | HTMLModElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLModElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLModElement(HTMLElement):
cite = attr_property("cite")
dateTime = attr_property("datetime")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 292 | Python | .py | 8 | 32.5 | 44 | 0.717857 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,830 | HTMLAnchorElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLAnchorElement.py | #!/usr/bin/env python
import logging
import time
import datetime
from urllib.parse import urlparse
from .HTMLElement import HTMLElement
from .attr_property import attr_property
log = logging.getLogger("Thug")
class HTMLAnchorElement(HTMLElement):
accessKey = attr_property("accesskey")
charset = attr_prope... | 1,878 | Python | .py | 63 | 22.888889 | 59 | 0.604794 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,831 | HTMLTableCellElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLTableCellElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
class HTMLTableCellElement(HTMLElement):
abbr = attr_property("abbr")
align = attr_property("align")
axis = attr_property("axis")
bgColor = attr_property("bgcol... | 893 | Python | .py | 25 | 30.84 | 44 | 0.683662 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,832 | HTMLIFrameElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLIFrameElement.py | #!/usr/bin/env python
import logging
from thug.DOM import W3C
from .HTMLElement import HTMLElement
from .attr_property import attr_property
log = logging.getLogger("Thug")
class HTMLIFrameElement(HTMLElement):
align = attr_property("align")
frameBorder = attr_property("frameborder")
height = attr_prope... | 1,219 | Python | .py | 32 | 32.9375 | 70 | 0.702886 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,833 | HTMLTextAreaElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLTextAreaElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
from .text_property import text_property
from .form_property import form_property
class HTMLTextAreaElement(HTMLElement):
accessKey = attr_property("accesskey")
cols = ... | 1,004 | Python | .py | 33 | 25.121212 | 45 | 0.681582 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,834 | HTMLTitleElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLTitleElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .text_property import text_property
class HTMLTitleElement(HTMLElement):
text = text_property()
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 247 | Python | .py | 7 | 31.428571 | 44 | 0.724576 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,835 | HTMLFormControlsCollection.py | buffer_thug/thug/DOM/W3C/HTML/HTMLFormControlsCollection.py | #!/usr/bin/env python
from .HTMLCollection import HTMLCollection
class HTMLFormControlsCollection(HTMLCollection):
def __init__(self, doc, nodes):
HTMLCollection.__init__(self, doc, nodes)
| 204 | Python | .py | 5 | 36.8 | 49 | 0.75 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,836 | HTMLElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLElement.py | #!/usr/bin/env python
import logging
import random
import io
import bs4
from thug.DOM.W3C.Core.DOMException import DOMException
from thug.DOM.W3C.Core.Element import Element
from .Dataset import Dataset
from .attr_property import attr_property
log = logging.getLogger("Thug")
class HTMLElement(Element):
classN... | 4,438 | Python | .py | 120 | 28.125 | 82 | 0.623744 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,837 | HTMLBaseElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLBaseElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLBaseElement(HTMLElement):
href = attr_property("href")
target = attr_property("target")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 289 | Python | .py | 8 | 32.125 | 44 | 0.714801 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,838 | HTMLOptionElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLOptionElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
from .form_property import form_property
class HTMLOptionElement(HTMLElement):
defaultSelected = bool_property("selected")
index = attr_property("index", int, readonly=... | 663 | Python | .py | 18 | 32.444444 | 62 | 0.714063 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,839 | HTMLHeadElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLHeadElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLHeadElement(HTMLElement):
profile = attr_property("profile")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 258 | Python | .py | 7 | 33 | 44 | 0.728745 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,840 | HTMLLinkElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLLinkElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLLinkElement(HTMLElement):
charset = attr_property("charset", default="")
disabled = False
href = attr_property("href")
hreflang = attr_property("hreflang")
media = attr_property("media")
... | 532 | Python | .py | 15 | 31 | 50 | 0.682261 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,841 | HTMLCollection.py | buffer_thug/thug/DOM/W3C/HTML/HTMLCollection.py | #!/usr/bin/env python
import logging
import bs4
from thug.DOM.JSClass import JSClass
log = logging.getLogger("Thug")
class HTMLCollection(JSClass):
def __init__(self, doc, nodes):
self.doc = doc
self.nodes = nodes
def __len__(self):
return self.length
def __getitem__(self, ke... | 1,278 | Python | .py | 34 | 29.617647 | 87 | 0.629177 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,842 | HTMLStyleElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLStyleElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLStyleElement(HTMLElement):
disabled = False
media = attr_property("media")
type = attr_property("type")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 309 | Python | .py | 9 | 30.222222 | 44 | 0.709459 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,843 | HTMLIsIndexElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLIsIndexElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLIsIndexElement(HTMLElement):
form = None
prompt = attr_property("prompt")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 275 | Python | .py | 8 | 30.375 | 44 | 0.718631 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,844 | HTMLHRElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLHRElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
class HTMLHRElement(HTMLElement):
align = attr_property("align")
noShade = bool_property("noshade")
size = attr_property("size")
width = attr_property("width")
... | 400 | Python | .py | 11 | 32.454545 | 44 | 0.716883 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,845 | HTMLFieldSetElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLFieldSetElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .bool_property import bool_property
from .form_property import form_property
class HTMLFieldSetElement(HTMLElement):
disabled = bool_property("disabled")
form = form_property()
def __init__(self, doc, tag):
HTMLElement.__init__(self... | 332 | Python | .py | 9 | 33.222222 | 44 | 0.739812 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,846 | text_property.py | buffer_thug/thug/DOM/W3C/HTML/text_property.py | #!/usr/bin/env python
import logging
log = logging.getLogger("Thug")
def text_property(readonly=False):
def getter(self):
return str(self.tag.string) if self.tag.string else ""
def setter(self, text):
self.tag.string = text
if self.tagName.lower() in ("script",):
if log... | 841 | Python | .py | 18 | 36.777778 | 88 | 0.636364 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,847 | HTMLAllCollection.py | buffer_thug/thug/DOM/W3C/HTML/HTMLAllCollection.py | #!/usr/bin/env python
from .HTMLCollection import HTMLCollection
class HTMLAllCollection(HTMLCollection):
def __init__(self, doc, nodes):
HTMLCollection.__init__(self, doc, nodes)
def tags(self, name):
from thug.DOM.W3C.Core.NodeList import NodeList
nodes = list(self.doc.find_all(na... | 374 | Python | .py | 9 | 35.555556 | 55 | 0.697222 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,848 | HTMLAppletElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLAppletElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLAppletElement(HTMLElement):
align = attr_property("align")
alt = attr_property("alt")
archive = attr_property("archive")
code = attr_property("code")
codeBase = attr_property("codebase")
... | 626 | Python | .py | 17 | 32.294118 | 44 | 0.684298 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,849 | HTMLSpanElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLSpanElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
class HTMLSpanElement(HTMLElement):
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 177 | Python | .py | 5 | 31.4 | 44 | 0.710059 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,850 | HTMLParamElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLParamElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLParamElement(HTMLElement):
name = attr_property("name")
type = attr_property("type")
value = attr_property("value")
valueType = attr_property("valuetype")
def __init__(self, doc, tag):
... | 364 | Python | .py | 10 | 32.2 | 44 | 0.705714 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,851 | form_property.py | buffer_thug/thug/DOM/W3C/HTML/form_property.py | #!/usr/bin/env python
import logging
log = logging.getLogger("Thug")
def form_property(default=None):
def getter(self):
if self.tag.parent.name.lower() not in ("form",):
return default
_form = getattr(self, "_form", None)
if _form is None:
self._form = log.DOMImp... | 463 | Python | .py | 14 | 25 | 65 | 0.61086 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,852 | HTMLTableRowElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLTableRowElement.py | #!/usr/bin/env python
import logging
from thug.DOM.W3C.Core.DOMException import DOMException
from .HTMLElement import HTMLElement
from .HTMLCollection import HTMLCollection
from .HTMLTableCellElement import HTMLTableCellElement
from .attr_property import attr_property
log = logging.getLogger("Thug")
class HTMLTable... | 2,865 | Python | .py | 76 | 28.986842 | 77 | 0.615468 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,853 | TimeRanges.py | buffer_thug/thug/DOM/W3C/HTML/TimeRanges.py | #!/usr/bin/env python
from thug.DOM.JSClass import JSClass
from thug.DOM.W3C.Core.DOMException import DOMException
class TimeRanges(JSClass):
def __init__(self, doc, ranges):
self.doc = doc
self.ranges = ranges
@property
def length(self):
return len(self.ranges)
def start(se... | 683 | Python | .py | 18 | 30.944444 | 56 | 0.660578 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,854 | HTMLOptionsCollection.py | buffer_thug/thug/DOM/W3C/HTML/HTMLOptionsCollection.py | #!/usr/bin/env python
from .HTMLCollection import HTMLCollection
# Introduced in DOM Level 2
class HTMLOptionsCollection(HTMLCollection):
def __init__(self, doc, nodes):
HTMLCollection.__init__(self, doc, nodes)
| 227 | Python | .py | 6 | 34.333333 | 49 | 0.747706 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,855 | HTMLImageElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLImageElement.py | #!/usr/bin/env python
import logging
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
log = logging.getLogger("Thug")
class HTMLImageElement(HTMLElement):
align = attr_property("align")
alt = attr_property("alt")
border = attr_proper... | 1,233 | Python | .py | 33 | 30.909091 | 78 | 0.64899 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,856 | HTMLInputElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLInputElement.py | #!/usr/bin/env python
import sys
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
from .form_property import form_property
class HTMLInputElement(HTMLElement):
accept = attr_property("accept")
accessKey = attr_property("accesskey")
al... | 1,330 | Python | .py | 40 | 27.95 | 68 | 0.675274 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,857 | HTMLBodyElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLBodyElement.py | #!/usr/bin/env python
import logging
import io
import bs4
from .HTMLElement import HTMLElement
from .attr_property import attr_property
log = logging.getLogger("Thug")
class HTMLBodyElement(HTMLElement):
aLink = attr_property("alink")
background = attr_property("background")
bgColor = attr_property("b... | 1,484 | Python | .py | 40 | 28.775 | 78 | 0.626489 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,858 | HTMLTableSectionElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLTableSectionElement.py | #!/usr/bin/env python
import logging
import bs4
from thug.DOM.W3C.Core.DOMException import DOMException
from .HTMLElement import HTMLElement
from .HTMLCollection import HTMLCollection
from .HTMLTableRowElement import HTMLTableRowElement
from .attr_property import attr_property
log = logging.getLogger("Thug")
class... | 2,075 | Python | .py | 53 | 30.962264 | 90 | 0.637631 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,859 | HTMLDListElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLDListElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLDListElement(HTMLElement):
compact = attr_property("compact", bool)
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 265 | Python | .py | 7 | 34 | 44 | 0.728346 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,860 | HTMLTableColElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLTableColElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLTableColElement(HTMLElement):
align = attr_property("align")
ch = attr_property("char")
chOff = attr_property("charoff")
span = attr_property("span", int)
vAlign = attr_property("valign")... | 436 | Python | .py | 12 | 32 | 44 | 0.692857 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,861 | __init__.py | buffer_thug/thug/DOM/W3C/HTML/__init__.py | __all__ = [
"AudioTrackList",
"HTMLAllCollection",
"HTMLAnchorElement",
"HTMLAppletElement",
"HTMLAudioElement",
"HTMLBRElement",
"HTMLBaseElement",
"HTMLBaseFontElement",
"HTMLBodyElement",
"HTMLButtonElement",
"HTMLCollection",
"HTMLDirectoryElement",
"HTMLDivElemen... | 4,769 | Python | .py | 132 | 33.143939 | 86 | 0.843797 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,862 | HTMLHtmlElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLHtmlElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLHtmlElement(HTMLElement):
version = attr_property("version")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 258 | Python | .py | 7 | 33 | 44 | 0.728745 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,863 | HTMLFrameElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLFrameElement.py | #!/usr/bin/env python
import logging
from .HTMLElement import HTMLElement
from .attr_property import attr_property
log = logging.getLogger("Thug")
class HTMLFrameElement(HTMLElement):
frameBorder = attr_property("frameborder")
longDesc = attr_property("longdesc")
marginHeight = attr_property("marginheig... | 948 | Python | .py | 25 | 32.76 | 70 | 0.702732 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,864 | bool_property.py | buffer_thug/thug/DOM/W3C/HTML/bool_property.py | #!/usr/bin/env python
def bool_property(name, attrtype=bool, readonly=False, default=False, novalue=False):
def getter(self):
if novalue:
return self.tag.has_attr(name)
return attrtype(self.tag[name]) if self.tag.has_attr(name) else default
def setter(self, value):
self.t... | 418 | Python | .py | 9 | 39.555556 | 85 | 0.695545 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,865 | TextTrackList.py | buffer_thug/thug/DOM/W3C/HTML/TextTrackList.py | #!/usr/bin/env python
from .HTMLCollection import HTMLCollection
class TextTrackList(HTMLCollection):
def __init__(self, doc, tracks):
HTMLCollection.__init__(self, doc, tracks)
def getTrackById(self, id_): # pylint:disable=unused-argument
return None
| 281 | Python | .py | 7 | 35.142857 | 66 | 0.718519 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,866 | HTMLTableCaptionElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLTableCaptionElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLTableCaptionElement(HTMLElement):
align = attr_property("align")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 262 | Python | .py | 7 | 33.571429 | 44 | 0.733068 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,867 | HTMLLegendElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLLegendElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .form_property import form_property
class HTMLLegendElement(HTMLElement):
accessKey = attr_property("accesskey")
align = attr_property("align")
form = form_property()
def __init__(self, doc, tag)... | 367 | Python | .py | 10 | 32.9 | 44 | 0.730878 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,868 | HTMLMediaElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLMediaElement.py | #!/usr/bin/env python
import logging
from thug.DOM.W3C.DOMTokenList import DOMTokenList
from .HTMLElement import HTMLElement
from .AudioTrackList import AudioTrackList
from .TextTrackList import TextTrackList
from .TimeRanges import TimeRanges
from .attr_property import attr_property
log = logging.getLogger("Thug"... | 4,236 | Python | .py | 128 | 26.9375 | 111 | 0.679134 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,869 | HTMLDivElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLDivElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLDivElement(HTMLElement):
align = attr_property("align")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 253 | Python | .py | 7 | 32.285714 | 44 | 0.72314 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,870 | HTMLMetaElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLMetaElement.py | #!/usr/bin/env python
import logging
from .HTMLElement import HTMLElement
from .attr_property import attr_property
log = logging.getLogger("Thug")
class HTMLMetaElement(HTMLElement):
content = attr_property("content")
httpEquiv = attr_property("http-equiv")
name = attr_property("name", default="")
... | 651 | Python | .py | 17 | 33.058824 | 68 | 0.683706 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,871 | HTMLDocument.py | buffer_thug/thug/DOM/W3C/HTML/HTMLDocument.py | #!/usr/bin/env python
import logging
from urllib.parse import urlparse
import bs4
from lxml.html import builder as E
from lxml.html import tostring
from thug.DOM.W3C.Core.Document import Document
from .HTMLBodyElement import HTMLBodyElement
from .text_property import text_property
log = logging.getLogger("Thug")... | 16,355 | Python | .py | 411 | 29.506083 | 102 | 0.605508 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,872 | HTMLFrameSetElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLFrameSetElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLFrameSetElement(HTMLElement):
cols = attr_property("cols")
rows = attr_property("rows")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 289 | Python | .py | 8 | 32.125 | 44 | 0.714801 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,873 | TAnimateColor.py | buffer_thug/thug/DOM/W3C/HTML/TAnimateColor.py | #!/usr/bin/env python
import string
import logging
from .HTMLElement import HTMLElement
log = logging.getLogger("Thug")
class TAnimateColor(HTMLElement):
def __init__(self, doc, tag):
self.doc = doc
self.tag = tag
HTMLElement.__init__(self, doc, tag)
self._values = ""
def g... | 1,042 | Python | .py | 28 | 27.857143 | 106 | 0.611554 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,874 | HTMLDocumentCompatibleInfoCollection.py | buffer_thug/thug/DOM/W3C/HTML/HTMLDocumentCompatibleInfoCollection.py | #!/usr/bin/env python
from .HTMLCollection import HTMLCollection
class HTMLDocumentCompatibleInfoCollection(HTMLCollection):
"""
http://msdn.microsoft.com/en-us/library/hh826015(v=vs.85).aspx
There are no standards that apply here.
"""
def __init__(self, doc, nodes):
HTMLCollection.__in... | 412 | Python | .py | 11 | 32.272727 | 66 | 0.691139 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,875 | HTMLButtonElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLButtonElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
from .form_property import form_property
class HTMLButtonElement(HTMLElement):
accessKey = attr_property("accesskey")
disabled = bool_property("disabled")
form = fo... | 561 | Python | .py | 15 | 33.466667 | 45 | 0.721402 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,876 | HTMLOptGroupElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLOptGroupElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
class HTMLOptGroupElement(HTMLElement):
disabled = bool_property("disabled")
label = attr_property("label")
def __init__(self, doc, tag):
HTMLElement.__ini... | 340 | Python | .py | 9 | 34.111111 | 44 | 0.740061 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,877 | HTMLVideoElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLVideoElement.py | #!/usr/bin/env python
import logging
from .HTMLMediaElement import HTMLMediaElement
from .attr_property import attr_property
from .bool_property import bool_property
log = logging.getLogger("Thug")
class HTMLVideoElement(HTMLMediaElement):
width = attr_property("width", int, default=0)
height = attr_proper... | 654 | Python | .py | 15 | 39.8 | 62 | 0.736177 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,878 | HTMLTableElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLTableElement.py | #!/usr/bin/env python
import logging
import bs4
from thug.DOM.W3C.Core.DOMException import DOMException
from .HTMLElement import HTMLElement
from .HTMLCollection import HTMLCollection
from .HTMLTableRowElement import HTMLTableRowElement
from .HTMLTableSectionElement import HTMLTableSectionElement
from .HTMLTableCapt... | 4,449 | Python | .py | 115 | 30.4 | 90 | 0.64093 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,879 | HTMLUListElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLUListElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
from .bool_property import bool_property
class HTMLUListElement(HTMLElement):
compact = bool_property("compact")
type = attr_property("type")
def __init__(self, doc, tag):
HTMLElement.__init__(sel... | 333 | Python | .py | 9 | 33.333333 | 44 | 0.734375 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,880 | HTMLDirectoryElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLDirectoryElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .bool_property import bool_property
class HTMLDirectoryElement(HTMLElement):
compact = bool_property("compact")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 263 | Python | .py | 7 | 33.714286 | 44 | 0.734127 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,881 | HTMLDocumentCompatibleInfo.py | buffer_thug/thug/DOM/W3C/HTML/HTMLDocumentCompatibleInfo.py | #!/usr/bin/env python
class HTMLDocumentCompatibleInfo:
"""
IHTMLDocumentCompatibleInfo provides information about the
compatibility mode specified by the web page. If the web page
specifies multiple compatibility modes, they can be retrieved
using IHTMLDocumentCompatibleInfoCollection.
http:... | 952 | Python | .py | 23 | 35.217391 | 66 | 0.716776 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,882 | HTMLParagraphElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLParagraphElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLParagraphElement(HTMLElement):
align = attr_property("align")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 259 | Python | .py | 7 | 33.142857 | 44 | 0.729839 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,883 | HTMLQuoteElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLQuoteElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLQuoteElement(HTMLElement):
cite = attr_property("cite")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 253 | Python | .py | 7 | 32.285714 | 44 | 0.72314 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,884 | HTMLBRElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLBRElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLBRElement(HTMLElement):
clear = attr_property("clear")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 252 | Python | .py | 7 | 32.142857 | 44 | 0.721992 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,885 | HTMLSelectElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLSelectElement.py | #!/usr/bin/env python
from thug.DOM.W3C.Core.DOMException import DOMException
from .HTMLElement import HTMLElement
from .HTMLOptionsCollection import HTMLOptionsCollection
from .attr_property import attr_property
from .bool_property import bool_property
class HTMLSelectElement(HTMLElement):
selectedIndex = 0
... | 1,594 | Python | .py | 48 | 26.104167 | 67 | 0.65206 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,886 | HTMLMenuElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLMenuElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLMenuElement(HTMLElement):
compact = attr_property("compact", bool)
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 264 | Python | .py | 7 | 33.857143 | 44 | 0.727273 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,887 | HTMLFontElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLFontElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLFontElement(HTMLElement):
color = attr_property("color")
face = attr_property("face")
size = attr_property("size")
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 320 | Python | .py | 9 | 31.444444 | 44 | 0.703583 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,888 | Dataset.py | buffer_thug/thug/DOM/W3C/HTML/Dataset.py | #!/usr/bin/env python
import re
class Dataset:
def __init__(self, attrs):
self.__dict__["attrs"] = attrs
def __getattr__(self, attr):
data_attr = re.sub("([A-Z])", r"-\1", attr).lower()
return self.__dict__["attrs"].get(f"data-{data_attr}", "")
def __setattr__(self, attr, value)... | 611 | Python | .py | 14 | 37.071429 | 70 | 0.527919 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,889 | HTMLPreElement.py | buffer_thug/thug/DOM/W3C/HTML/HTMLPreElement.py | #!/usr/bin/env python
from .HTMLElement import HTMLElement
from .attr_property import attr_property
class HTMLPreElement(HTMLElement):
width = attr_property("width", int)
def __init__(self, doc, tag):
HTMLElement.__init__(self, doc, tag)
| 258 | Python | .py | 7 | 33 | 44 | 0.720648 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,890 | attr_property.py | buffer_thug/thug/DOM/W3C/HTML/attr_property.py | #!/usr/bin/env python
def attr_property(name, attrtype=str, readonly=False, default=None):
def getter(self):
return attrtype(self.tag[name]) if self.tag.has_attr(name) else default
def setter(self, value):
if attrtype in (int,) and str(value).endswith("px"):
value = int(str(value)... | 462 | Python | .py | 9 | 44.444444 | 79 | 0.676339 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,891 | __init__.py | buffer_thug/thug/DOM/W3C/URL/__init__.py | __all__ = ["URL", "URLSearchParams"]
from .URL import URL
from .URLSearchParams import URLSearchParams
| 104 | Python | .py | 3 | 33.333333 | 44 | 0.77 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,892 | URL.py | buffer_thug/thug/DOM/W3C/URL/URL.py | #!/usr/bin/env python
#
# URL.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witho... | 5,148 | Python | .py | 134 | 31.246269 | 82 | 0.629361 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,893 | URLSearchParams.py | buffer_thug/thug/DOM/W3C/URL/URLSearchParams.py | #!/usr/bin/env python
#
# URLSearchParams.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WAR... | 2,728 | Python | .py | 71 | 30.788732 | 79 | 0.631179 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,894 | HTMLEvent.py | buffer_thug/thug/DOM/W3C/Events/HTMLEvent.py | #!/usr/bin/env python
from .Event import Event
# Introduced in DOM Level 2
class HTMLEvent(Event):
EventTypes = (
"load",
"unload",
"abort",
"error",
"select",
"change",
"submit",
"reset",
"focus",
"blur",
"resize",
"... | 389 | Python | .py | 20 | 12.45 | 28 | 0.473973 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,895 | MouseEvent.py | buffer_thug/thug/DOM/W3C/Events/MouseEvent.py | #!/usr/bin/env python
from .UIEvent import UIEvent
# Introduced in DOM Level 2
class MouseEvent(UIEvent):
EventTypes = ("click", "mousedown", "mouseup", "mouseover", "mousemove", "mouseout")
def __init__(self):
UIEvent.__init__(self)
self._screenX = None
self._screenY = None
... | 2,068 | Python | .py | 76 | 19.684211 | 88 | 0.612854 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,896 | Event.py | buffer_thug/thug/DOM/W3C/Events/Event.py | #!/usr/bin/env python
import logging
from thug.DOM.JSClass import JSClass
log = logging.getLogger("Thug")
# Introduced in DOM Level 2
class Event(JSClass):
CAPTURING_PHASE = 1 # The current event phase is the capturing phase.
AT_TARGET = 2 # The event is currently being evaluated at the target EventTarge... | 4,094 | Python | .py | 98 | 33.132653 | 85 | 0.668515 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,897 | EventTarget.py | buffer_thug/thug/DOM/W3C/Events/EventTarget.py | #!/usr/bin/env python
import logging
from .Event import Event
from .EventException import EventException
log = logging.getLogger("Thug")
# Introduced in DOM Level 2
class EventTarget:
def __init__(self, doc, tag):
self.__init_eventtarget_personality()
self.doc = doc
self.tag = tag
... | 9,365 | Python | .py | 194 | 37.829897 | 122 | 0.644779 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,898 | __init__.py | buffer_thug/thug/DOM/W3C/Events/__init__.py | __all__ = [
"DocumentEvent",
"Event",
"EventException",
"EventListener",
"EventTarget",
"HTMLEvent",
"MessageEvent",
"MouseEvent",
"MutationEvent",
"StorageEvent",
"UIEvent",
]
# from .DocumentEvent import DocumentEvent
from .Event import Event
from .EventException import E... | 628 | Python | .py | 24 | 23.25 | 42 | 0.780731 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |
12,899 | StorageEvent.py | buffer_thug/thug/DOM/W3C/Events/StorageEvent.py | #!/usr/bin/env python
from .Event import Event
# Introduced in DOM Level 2
class StorageEvent(Event):
EventTypes = ("storage",)
def __init__(self):
Event.__init__(self)
self._key = None
self._oldValue = None
self._newValue = None
self._url = None
self._storage... | 1,113 | Python | .py | 44 | 18.068182 | 65 | 0.606232 | buffer/thug | 978 | 204 | 0 | GPL-2.0 | 9/5/2024, 5:11:50 PM (Europe/Amsterdam) |