worked on downloads, magnets are next

This commit is contained in:
nosch
2026-03-08 22:29:28 +01:00
parent 87886a5cf9
commit 56735c4344
7 changed files with 61 additions and 51 deletions
+18
View File
@@ -1,11 +1,14 @@
import os
from bs4 import BeautifulSoup
from fuzzyfinder.main import fuzzyfinder
import requests
import re
import time
import webbrowser
from typing import Generator
from core.utils.data.state import state
from core.utils.logging.logs import consoleLog
cache = {
@@ -86,6 +89,21 @@ def scrape_steamrip_game_downloads(gamelink):
return ret
def get_download_link(post: Dict):
url = post["link"]
links = scrape_steamrip_game_downloads(url)
best = ""
for link in links:
if link[0] != "h":
best = link
break
if links.index(best) < 2:
return best
else:
consoleLog("cant scrape this cuz of captcha... opening in the browser")
webbrowser.open(best)
return None
def filter_steamrip(query: str):