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