Skip to content

Commit

Permalink
Fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ketok4321 committed Aug 16, 2023
1 parent e388763 commit f9cb177
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/speedtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def __init__(self, name, server, pingURL, dlURL, ulURL, **_):

self.name = name
self.server = server
self.pingURL = urljoin(server, pingURL)
self.downloadURL = urljoin(server, dlURL)
self.uploadURL = urljoin(server, ulURL)
self.pingURL = urljoin(server + "/", pingURL)
self.downloadURL = urljoin(server + "/", dlURL)
self.uploadURL = urljoin(server + "/", ulURL)

async def get_servers(): #TODO: do this in the background
async with aiohttp.ClientSession() as session:
Expand Down Expand Up @@ -104,6 +104,7 @@ async def ping(server): #TODO: jitter and other stuff
return sum(pings) / len(pings) * 1000

async def download(server, total):
print(server.downloadURL)
async with aiohttp.ClientSession() as session:
while True:
async with session.get(server.downloadURL + "?ckSize=" + str(CHUNK_SIZE), headers=headers) as response:
Expand Down

0 comments on commit f9cb177

Please sign in to comment.