feat: Add new calculators for acres to square feet, angstroms to nanometers, apothecary ounces to grams, astronomical units to light years, and atmosphere to mmHg, and update the backlog.

This commit is contained in:
Ben
2026-02-21 00:00:22 -08:00
parent abd504ed3f
commit ad0660adba
4 changed files with 189 additions and 119 deletions

19
get_107.py Normal file
View File

@@ -0,0 +1,19 @@
import urllib.request
import json
import base64
url_base = "https://howdoyouconvert.com/wp-json/wp/v2/calculator/107?context=edit"
creds = base64.b64encode(b"ben:6YGf wVxu gBpz pkqx BGZO lfVP").decode("utf-8")
headers = {
"Authorization": "Basic " + creds,
"User-Agent": "Mozilla/5.0"
}
req = urllib.request.Request(url_base, headers=headers)
try:
resp = urllib.request.urlopen(req)
data = json.loads(resp.read().decode("utf-8"))
print(data['content']['raw'])
except Exception as e:
print("Error:", e)
if hasattr(e, 'read'): print("Response:", e.read().decode("utf-8"))