dev 02011812

This commit is contained in:
Julian Freeman
2024-02-01 18:12:45 -04:00
parent 3e17def627
commit 38d98dee94
14 changed files with 536 additions and 406 deletions

View File

@@ -3,22 +3,19 @@ import os
import wmi
import json
import win32gui
import requests
import subprocess
from pathlib import Path
from PySide6.QtCore import QDir, QSettings
from PySide6.QtGui import QImage, QIcon, QPixmap
from global_vars import request_content
def get_isp_name() -> str:
req = requests.get("https://ipinfo.io/")
if req.status_code == 200:
try:
data = json.loads(req.content)
return data.get("org", "[Not found]")
except json.JSONDecodeError:
return "[Decode Error]"
return "[Return Error]"
try:
data = json.loads(request_content("https://ipinfo.io/"))
return data.get("org", "[Not found]")
except json.JSONDecodeError:
return "[Decode Error]"
def get_win_manufacturer() -> list[str]:
@@ -83,4 +80,3 @@ def extract_win_icon_from_file(icon: str, default: QIcon) -> QIcon:
return QIcon(QPixmap(image))
else:
return default