Browse Source

Fix regex HTML parsing (lol) of ModularGrid moduleId

v1
Andrew Belt 3 years ago
parent
commit
e13d8db88b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      scripts/update_modulargrid.py

+ 1
- 1
scripts/update_modulargrid.py View File

@@ -45,7 +45,7 @@ def update():
# Scrape ModularGrid website for ID
mg_url = mg_data['mgUrl']
r = requests.get(mg_url)
m = re.search(r'data-module-id = "(\d+)"', r.text)
m = re.search(r'data-module-id\w*=\w*"(\d+)"', r.text)
mg_id = m.group(1)
if not mg_id:
print(f"No ModularGrid ID found for {plugin_slug} {module_slug}")


Loading…
Cancel
Save