parent
fa1754f70b
commit
526d07296b
|
@ -18,7 +18,7 @@ def get_pres() -> List[Pre]:
|
||||||
logger.info("Getting pres from predbs")
|
logger.info("Getting pres from predbs")
|
||||||
|
|
||||||
# PreDBs in order of preference
|
# PreDBs in order of preference
|
||||||
predbs = (get_xrel, get_xrel_p2p, get_predbde, get_predbovh)
|
predbs = (get_xrel, get_xrel_p2p, get_predbde)
|
||||||
pres = {}
|
pres = {}
|
||||||
for get in reversed(predbs):
|
for get in reversed(predbs):
|
||||||
try:
|
try:
|
||||||
|
@ -100,24 +100,3 @@ def get_predbde(categories=("GAMES", "0DAY"), num_pages=5) -> List[Pre]:
|
||||||
for page in range(1, num_pages)
|
for page in range(1, num_pages)
|
||||||
for rls in get_releases_in_category(category, page)
|
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