32 lines
950 B
Python
32 lines
950 B
Python
import urllib.request
|
|
import re
|
|
|
|
def check_calculator(url, search_terms):
|
|
print(f"\n--- Checking {url} ---")
|
|
headers = {"User-Agent": "Mozilla/5.0"}
|
|
try:
|
|
req = urllib.request.Request(url, headers=headers)
|
|
html = urllib.request.urlopen(req).read().decode('utf-8')
|
|
|
|
found_all = True
|
|
for term in search_terms:
|
|
if term in html:
|
|
print(f"Found: {term}")
|
|
else:
|
|
print(f"NOT FOUND: {term}")
|
|
found_all = False
|
|
return found_all
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
return False
|
|
|
|
# 1. ASCII to Binary
|
|
check_calculator("https://howdoyouconvert.com/calculator/ascii-to-binary/", [
|
|
"input-1", "input-2", "charCodeAt", "toString(2)"
|
|
])
|
|
|
|
# 2. Amps to Volts (Triple)
|
|
check_calculator("https://howdoyouconvert.com/calculator/amps-to-volts/", [
|
|
"input-1", "input-2", "input-3", "toFixed(2)", "a * v"
|
|
])
|