From 0ef8d0911931e8e748b2fa20182d22794a4ecd1d Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Mon, 8 Jul 2024 19:31:48 -0500 Subject: [PATCH] Use single quotes inside f-strings --- bin/qbth | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/qbth b/bin/qbth index e3bd5c8..0750c96 100755 --- a/bin/qbth +++ b/bin/qbth @@ -23,9 +23,9 @@ def add_torrents_from_html(webpage_url: str, torrent_substring: str): soup = BeautifulSoup(reqs.text, "html.parser") for link in soup.find_all("a"): if torrent_substring in link.get("href"): - url = f"{webpage_url}/{link.get("href")}" + url = f"{webpage_url}/{link.get('href')}" qb.download_from_link(url, category="distro") - print(f"Added {link.get("href")}") + print(f"Added {link.get('href')}") def remove_torrents(distro_substring: str): @@ -33,7 +33,7 @@ def remove_torrents(distro_substring: str): for torrent in torrents: if distro_substring in torrent["name"]: qb.delete_permanently(torrent["hash"]) - print(f"Removed {torrent["name"]}") + print(f"Removed {torrent['name']}") def add_almalinux(relver: str): @@ -98,7 +98,7 @@ def add_freebsd(relver: str): for line in data: if line.startswith("magnet:"): qb.download_from_link(line, category="distro") - print(f"Added {line.split("=")[2]}") + print(f"Added {line.split('=')[2]}") def remove_freebsd(relver: str): @@ -131,7 +131,7 @@ def add_nixos(): json_data = json.loads(reqs.text) for item in json_data["assets"]: qb.download_from_link(item["browser_download_url"], category="distro") - print(f"Added {os.path.basename(item["browser_download_url"])}") + print(f"Added {os.path.basename(item['browser_download_url'])}") def remove_nixos():