From 760e669b21d6bf5c8d8721a2d3041ae2e3a904fc Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Fri, 6 Jan 2023 00:09:11 +0100 Subject: [PATCH] Remove json dependency --- commands/pygg.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commands/pygg.py b/commands/pygg.py index fae5605..36eb78b 100755 --- a/commands/pygg.py +++ b/commands/pygg.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 import argparse -import json import os import re import urllib @@ -37,7 +36,7 @@ def check_files(id): params={"torrent": id}, headers={"Host": YGG_DOMAIN}, ) - res = json.loads(req.text) + res = req.json() html = bs4.BeautifulSoup(res["html"], "html.parser") trs = html.select("tr") return len(trs) == 1 and "mkv" in trs[0].get_text().lower()