This commit is contained in:
parent
05297aece2
commit
55db6736ba
@ -106,9 +106,11 @@ def parse_size(size):
|
|||||||
|
|
||||||
|
|
||||||
def check_files(id):
|
def check_files(id):
|
||||||
req = requests.get(f"https://{YGG_DOMAIN}/engine/get_files", params={"torrent": id})
|
req = session.get(f"{YGG_DOMAIN}/engine/get_files", params={"torrent": id})
|
||||||
res = json.loads(req.text)
|
res = bs4.BeautifulSoup(req.text, "html.parser")
|
||||||
html = bs4.BeautifulSoup(res["html"], "html.parser")
|
pre = res.select_one("pre")
|
||||||
|
jhtml = json.loads(pre.get_text())
|
||||||
|
html = bs4.BeautifulSoup(jhtml["html"], "html.parser")
|
||||||
trs = html.select("tr")
|
trs = html.select("tr")
|
||||||
return len(trs) == 1 and "mkv" in trs[0].get_text().lower()
|
return len(trs) == 1 and "mkv" in trs[0].get_text().lower()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user