From d438a8dea443679ab102659613e55a543485099a Mon Sep 17 00:00:00 2001 From: Omicron166 <64985125+Omicron166@users.noreply.github.com> Date: Sun, 10 Jul 2022 00:32:24 +0200 Subject: [PATCH] replace requests with urllib.request --- Unofficial miners/Minimal_PC_Miner.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Unofficial miners/Minimal_PC_Miner.py b/Unofficial miners/Minimal_PC_Miner.py index 52809ab2..f401bdbd 100644 --- a/Unofficial miners/Minimal_PC_Miner.py +++ b/Unofficial miners/Minimal_PC_Miner.py @@ -9,7 +9,8 @@ from socket import socket import sys # Only python3 included libraries import time -import requests +from urllib.request import Request, urlopen +from json import loads soc = socket() @@ -32,9 +33,7 @@ def current_time(): def fetch_pools(): while True: try: - response = requests.get( - "https://server.duinocoin.com/getPool" - ).json() + response = loads(urlopen(Request("https://server.duinocoin.com/getPool")).read().decode()) NODE_ADDRESS = response["ip"] NODE_PORT = response["port"]