diff --git a/linkcheck/better_exchook2.py b/linkcheck/better_exchook2.py
index cd5cc4f1..f4a5dee6 100644
--- a/linkcheck/better_exchook2.py
+++ b/linkcheck/better_exchook2.py
@@ -232,7 +232,7 @@ def better_exchook(etype, value, tb, out=sys.stdout):
if value is None or not valuestr:
line = "%s" % etype
else:
- line = "%s: %s" % (etype, valuestr)
+ line = f"{etype}: {valuestr}"
return line
if (isinstance(etype, BaseException) or
(hasattr(types, "InstanceType") and isinstance(etype, types.InstanceType)) or
diff --git a/linkcheck/checker/__init__.py b/linkcheck/checker/__init__.py
index dd0a28f5..e8b2f6de 100644
--- a/linkcheck/checker/__init__.py
+++ b/linkcheck/checker/__init__.py
@@ -197,7 +197,7 @@ def get_index_html(urls):
except KeyError:
# Some unicode entries raise KeyError.
url = name
- lines.append('%s' % (url, name))
+ lines.append(f'{name}')
lines.extend(["