MCPcopy Index your code
hub / github.com/pyload/pyload / parse_html_header

Function parse_html_header

module/plugins/internal/misc.py:847–862  ·  view source on GitHub ↗
(header)

Source from the content-addressed store, hash-verified

845
846
847def parse_html_header(header):
848 hdict = {}
849 _re = r'[ ]*(?P<key>.+?)[ ]*:[ ]*(?P<value>.+?)[ ]*\r?\n'
850
851 for key, value in re.findall(_re, header):
852 key = key.lower()
853 if key in hdict:
854 header_key = hdict.get(key)
855 if isinstance(header_key, list):
856 header_key.append(value)
857 else:
858 hdict[key] = [header_key, value]
859 else:
860 hdict[key] = value
861
862 return hdict
863
864
865def parse_html_tag_attr_value(attr_name, tag):

Callers 3

loadMethod · 0.85
uploadMethod · 0.85
handle_functionMethod · 0.85

Calls 2

getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected