minor var naming
parent
6e64eadc27
commit
e491ce5319
|
@ -51,23 +51,23 @@ def periodical_script():
|
|||
logging.info(f'addons list created at "{config_path}"')
|
||||
|
||||
esoui_prefix = re.compile("https://www.esoui.com/downloads/info[0-9]+\-")
|
||||
addon_names = list()
|
||||
esoui_names = list()
|
||||
|
||||
for url in config_current.get("addons"):
|
||||
addon = esoui_prefix.split(url)[1]
|
||||
addon = addon.split(".html")[0]
|
||||
addon_names.append(addon)
|
||||
esoui_names.append(addon)
|
||||
|
||||
logging.info(addon_names)
|
||||
logging.info(esoui_names)
|
||||
|
||||
version_html = re.compile('<div\s+id="version">Version:\s+[^<]+')
|
||||
version_split = re.compile('<div\s+id="version">Version:\s+')
|
||||
addon_versions = list()
|
||||
esoui_version_html = re.compile('<div\s+id="version">Version:\s+[^<]+')
|
||||
esoui_version_split = re.compile('<div\s+id="version">Version:\s+')
|
||||
esoui_versions = list()
|
||||
|
||||
for url in config_current.get("addons"):
|
||||
response = requests.get(url)
|
||||
version_line = version_html.search(response.text)
|
||||
version = version_split.split(version_line.group(0))[1]
|
||||
addon_versions.append(version)
|
||||
version_line = esoui_version_html.search(response.text)
|
||||
version = esoui_version_split.split(version_line.group(0))[1]
|
||||
esoui_versions.append(version)
|
||||
|
||||
logging.info(addon_versions)
|
||||
logging.info(esoui_versions)
|
||||
|
|
Loading…
Reference in New Issue