Update cc/weather

This commit is contained in:
Nova Cat 2025-03-15 15:49:50 -07:00
parent 5c07d18682
commit b64a55e0ce

View file

@ -1,5 +1,5 @@
import requests, os, sys
if "WAPIKEY" in os.environ:
if not "WAPIKEY" in os.environ:
print("MeowNexUS requires the WAPIKEY environment variable for this command to function.")
sys.exit(1)
query = requests.get("http://api.weatherapi.com/v1/current.json?key=" + os.environ["WAPIKEY"] + "&q=" + " ".join(sys.argv[3:])).json()