parent
fa1754f70b
commit
526d07296b
1 changed files with 1 additions and 22 deletions
|
@ -18,7 +18,7 @@ def get_pres() -> List[Pre]:
|
|||
logger.info("Getting pres from predbs")
|
||||
|
||||
# PreDBs in order of preference
|
||||
predbs = (get_xrel, get_xrel_p2p, get_predbde, get_predbovh)
|
||||
predbs = (get_xrel, get_xrel_p2p, get_predbde)
|
||||
pres = {}
|
||||
for get in reversed(predbs):
|
||||
try:
|
||||
|
@ -100,24 +100,3 @@ def get_predbde(categories=("GAMES", "0DAY"), num_pages=5) -> List[Pre]:
|
|||
for page in range(1, num_pages)
|
||||
for rls in get_releases_in_category(category, page)
|
||||
]
|
||||
|
||||
|
||||
def get_predbovh() -> List[Pre]:
|
||||
logger.debug("Getting pres from predb.ovh")
|
||||
|
||||
r = cache.get(
|
||||
"https://predb.ovh/api/v1/",
|
||||
params={
|
||||
"q": "@cat GAMES|0DAY",
|
||||
"count": 100,
|
||||
},
|
||||
)
|
||||
|
||||
return [
|
||||
Pre(
|
||||
dirname=rls["name"],
|
||||
nfo_link="https://duckduckgo.com/?q={}".format(rls["name"]),
|
||||
timestamp=datetime.fromtimestamp(rls["preAt"]),
|
||||
)
|
||||
for rls in r.json["data"]["rows"]
|
||||
]
|
||||
|
|
Reference in a new issue