opticparse-python / check_live.py
Nanny7's picture
initial deploy
bcf46c3
Raw
History Blame Contribute Delete
875 Bytes
import urllib.request
import re
req = urllib.request.Request('https://dashboard.opticparse.com', headers={'User-Agent': 'Mozilla/5.0'})
try:
html = urllib.request.urlopen(req).read().decode('utf-8')
js_files = re.findall(r'src="(/assets/[^"]+\.js)"', html)
print('JS files:', js_files)
if js_files:
js_url = 'https://dashboard.opticparse.com' + js_files[0]
js_content = urllib.request.urlopen(urllib.request.Request(js_url, headers={'User-Agent': 'Mozilla/5.0'})).read().decode('utf-8')
if 'BulkScannerSection' in js_content or 'MonitorStatusSection' in js_content or 'Days Until Reset' in js_content:
print('New features are PRESENT in the live bundle!')
else:
print('New features are NOT present in the live bundle. The deployment failed or is pending.')
except Exception as e:
print('Error:', e)