installed fuzzyfinder, scraped the links, started UI

This commit is contained in:
nosch
2026-02-25 23:22:40 +01:00
parent 7662c861ea
commit 886ee8f0f0
4 changed files with 169 additions and 0 deletions
+1
View File
@@ -9,3 +9,4 @@ plyer==2.1.0
psutil==7.1.0 psutil==7.1.0
libtorrent==2.0.11 libtorrent==2.0.11
libtorrent-windows-dll==0.0.3 libtorrent-windows-dll==0.0.3
fuzzyfinder==2.3.0
File diff suppressed because one or more lines are too long
+24
View File
@@ -0,0 +1,24 @@
from bs4 import BeautifulSoup
import requests
import re
#from core.utils.general.logs import consoleLog
def scrape_steamrip_links():
url = f"https://steamrip.com/games-list-page/"
response = requests.get(url)
soup = BeautifulSoup(response.text, "html.parser")
games = soup.find_all("li", class_="az-list-item")
if len(games) == 0:
return []
links = []
for gamehtml in games:
link = gamehtml.find("a", href=lambda x: x and x.startswith("/"))
links += re.findall('(?<=href=")[^"]*', link.__str__())
return links
if __name__ == "__main__":
print(scrape_steamrip_links())
+28
View File
@@ -0,0 +1,28 @@
import fuzzyfinder
from PySide6 import QtCore, QtWidgets, QtGui
class FuzzySearchWindow(QtWidgets.QWidget):
"""
The dict should contain a:
name : str
THIS IS REQUIRED
all other things will be displayed alphabetically after it.
All elements should have the same Keys, eg when one element has "sources" : "buzzheavier" all other elements should as well have a key called "sources", though the value can be "MegaDB"
All elements are strings, e.g. "count" : "1"
The key will be at the Top of the Table
The value will be listed for each element
"""
def __init__(self, options: list[dict[str, str]]):
super().__init__()
self.opts: list[dict[str, str]] = options
self.searchbox = QtWidgets.QTextEdit()
self.searchbox.placeholderText = "Search for a game"
self.table = QtWidgets.QTableWidget()
self.table.setHorizontalHeader(self.opts[0].keys())