1
0
Fork 0

Remove predb.me

This commit is contained in:
Casper V. Kristensen 2022-06-12 18:45:45 +02:00
parent 2dcef470ad
commit f29531c723

View file

@ -3,8 +3,6 @@ from datetime import datetime
from typing import NamedTuple, List
from urllib.error import HTTPError
from bs4 import BeautifulSoup
from . import cache
logger = logging.getLogger(__name__)
@ -53,15 +51,3 @@ def get_xrel(categories=("CRACKED", "UPDATE"), num_pages=2) -> List[Pre]:
for page in range(1, num_pages)
for rls in get_releases_in_category(category, page)
]
def get_predbme() -> List[Pre]:
logger.debug("Getting pres from predb.me")
rss = cache.get("https://predb.me/?cats=games-pc&rss=1")
soup = BeautifulSoup(rss.text, "html.parser").find_all("item")
# Predb.me doesn't show timestamps in the RSS-feed, but the feed is so short it only shows ~72 hours worth of
# releases anyway, so we just set timestamp to now.
now = datetime.utcnow()
return [Pre(item.find("title").text, item.find("guid").text, now) for item in soup]