Remove json dependency
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ed7448196f
commit
760e669b21
@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import urllib
|
import urllib
|
||||||
@ -37,7 +36,7 @@ def check_files(id):
|
|||||||
params={"torrent": id},
|
params={"torrent": id},
|
||||||
headers={"Host": YGG_DOMAIN},
|
headers={"Host": YGG_DOMAIN},
|
||||||
)
|
)
|
||||||
res = json.loads(req.text)
|
res = req.json()
|
||||||
html = bs4.BeautifulSoup(res["html"], "html.parser")
|
html = bs4.BeautifulSoup(res["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