feat: add automation and inspection scripts for Nginx Proxy Manager and Authentik integration
This commit is contained in:
15
scripts/check_homepage_html.py
Normal file
15
scripts/check_homepage_html.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import urllib.request, ssl, re
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
req = urllib.request.Request('https://homepage.snarfnet.net/', headers={'User-Agent': 'Mozilla/5.0'})
|
||||
resp = urllib.request.urlopen(req, context=ctx)
|
||||
html = resp.read().decode('utf-8')
|
||||
|
||||
for pat in [r'href="([^"]+)"', r'src="([^"]+)"']:
|
||||
matches = re.findall(pat, html)
|
||||
for m in matches:
|
||||
if any(k in m for k in ['argo', 'tempest', 'weather', 'icon', 'png', 'svg']):
|
||||
print(m)
|
||||
Reference in New Issue
Block a user