Skip to content

Commit

Permalink
fix:result url cache info
Browse files Browse the repository at this point in the history
  • Loading branch information
Guovin committed Dec 11, 2024
1 parent 8a9eb6e commit 2662a3d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions utils/speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def sort_urls_by_speed_and_resolution(name, data, logger=None):
filter_data = []
for url, date, resolution, origin in data:
result = {
"url": url,
"url": remove_cache_info(url),
"date": date,
"delay": None,
"speed": None,
Expand All @@ -267,11 +267,10 @@ def sort_urls_by_speed_and_resolution(name, data, logger=None):
speed, delay, cache_resolution = cache_item['speed'], cache_item['delay'], cache_item['resolution']
resolution = cache_resolution or resolution
if speed is not None:
url = remove_cache_info(url)
try:
if logger:
logger.info(
f"Name: {name}, URL: {url}, Date: {date}, Delay: {delay} ms, Speed: {speed:.2f} M/s, Resolution: {resolution}"
f"Name: {name}, URL: {result["url"]}, Date: {date}, Delay: {delay} ms, Speed: {speed:.2f} M/s, Resolution: {resolution}"
)
except Exception as e:
print(e)
Expand Down

0 comments on commit 2662a3d

Please sign in to comment.