Update html.py

This commit is contained in:
Ahmed Ossama 2021-08-04 02:23:22 +02:00 committed by GitHub
parent 771e2ef167
commit 38d9928d09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,8 +69,7 @@ def parse_html_list(dictionary, prefix='', default=None):
"""
if isinstance(dictionary, (list, tuple)):
dictionary = str(dictionary)[1:-1]
dictionary = '{' + dictionary[1:-1].replace('}', '').replace('{', '') + '}'
dictionary = eval(dictionary)
dictionary = eval('{' + dictionary[1:-1].replace('}', '').replace('{', '') + '}')
ret = {}
regex = re.compile(r'^%s\[([0-9]+)\](.*)$' % re.escape(prefix))