Current Path: > > opt > alt > python37 > lib64 > python3.7 > site-packages > lxml > > html
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__pycache__ | Directory | - | - | |
ElementSoup.py | File | 319 bytes | September 25 2011 16:58:04. | |
__init__.py | File | 64806 bytes | July 27 2019 07:03:31. | |
_diffcommand.py | File | 2121 bytes | August 11 2019 08:26:53. | |
_html5builder.py | File | 3246 bytes | September 28 2012 19:13:25. | |
_setmixin.py | File | 1184 bytes | January 02 2019 17:17:08. | |
builder.py | File | 4310 bytes | September 25 2011 16:58:04. | |
clean.cpython-37m-x86_64-linux-gnu.so | File | 267584 bytes | April 24 2023 18:51:50. | |
clean.py | File | 26912 bytes | October 27 2019 14:36:31. | |
defs.py | File | 4192 bytes | July 27 2019 07:03:31. | |
diff.cpython-37m-x86_64-linux-gnu.so | File | 352776 bytes | April 24 2023 18:51:50. | |
diff.py | File | 30553 bytes | January 04 2019 15:34:22. | |
formfill.py | File | 9689 bytes | June 03 2017 16:47:37. | |
html5parser.py | File | 8634 bytes | September 17 2017 07:43:53. | |
soupparser.py | File | 10203 bytes | September 17 2017 07:43:53. | |
usedoctest.py | File | 249 bytes | September 25 2011 16:58:04. |
from __future__ import absolute_import import optparse import sys import re import os from .diff import htmldiff description = """\ """ parser = optparse.OptionParser( usage="%prog [OPTIONS] FILE1 FILE2\n" "%prog --annotate [OPTIONS] INFO1 FILE1 INFO2 FILE2 ...", description=description, ) parser.add_option( '-o', '--output', metavar="FILE", dest="output", default="-", help="File to write the difference to", ) parser.add_option( '-a', '--annotation', action="store_true", dest="annotation", help="Do an annotation") def main(args=None): if args is None: args = sys.argv[1:] options, args = parser.parse_args(args) if options.annotation: return annotate(options, args) if len(args) != 2: print('Error: you must give two files') parser.print_help() sys.exit(1) file1, file2 = args input1 = read_file(file1) input2 = read_file(file2) body1 = split_body(input1)[1] pre, body2, post = split_body(input2) result = htmldiff(body1, body2) result = pre + result + post if options.output == '-': if not result.endswith('\n'): result += '\n' sys.stdout.write(result) else: with open(options.output, 'wb') as f: f.write(result) def read_file(filename): if filename == '-': c = sys.stdin.read() elif not os.path.exists(filename): raise OSError( "Input file %s does not exist" % filename) else: with open(filename, 'rb') as f: c = f.read() return c body_start_re = re.compile( r"<body.*?>", re.I|re.S) body_end_re = re.compile( r"</body.*?>", re.I|re.S) def split_body(html): pre = post = '' match = body_start_re.search(html) if match: pre = html[:match.end()] html = html[match.end():] match = body_end_re.search(html) if match: post = html[match.start():] html = html[:match.start()] return pre, html, post def annotate(options, args): print("Not yet implemented") sys.exit(1)
SILENT KILLER Tool