mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 01:49:42 +02:00
installed fuzzyfinder, scraped the links, started UI
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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())
|
||||
Reference in New Issue
Block a user