Spaces:
Paused
Paused
Download check_live.py from paras9909/opticparse-python: direct link, hf CLI and curl.
- Browser
- Download file 875 Bytes
-
https://huggingface.co/spaces/paras9909/opticparse-python/resolve/main/check_live.py
- Command line
-
hf download hf://spaces/paras9909/opticparse-python/check_live.py
-
curl -L -o check_live.py https://huggingface.co/spaces/paras9909/opticparse-python/resolve/main/check_live.py
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) | |