mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
fix: Detect SteamRip hosts by URL
Replace brittle index-based host resolution in SteamripScraper with substring checks on the chosen download URL (buzzheavier, gofile, vikingfile, megadb). Add a console log for the resolved link and adjust returned values for gofile. Remove the unnecessary links.index lookup and its exception handling.
This commit is contained in:
@@ -110,23 +110,19 @@ class SteamripScraper:
|
|||||||
consoleLog("SteamRip: No valid download links found")
|
consoleLog("SteamRip: No valid download links found")
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
try:
|
|
||||||
idx = links.index(best)
|
|
||||||
except ValueError:
|
|
||||||
consoleLog("SteamRip: Failed to resolve download host")
|
|
||||||
return None, None
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if idx == 0:
|
consoleLog(f"Found download link: {best}")
|
||||||
|
if "buzzheavier" in best:
|
||||||
link = scrape_buzzheavier(best)
|
link = scrape_buzzheavier(best)
|
||||||
return link
|
return link
|
||||||
elif idx == 1:
|
elif "gofile" in best:
|
||||||
link, headers = scrape_gofile(best)
|
link, headers = scrape_gofile(best)
|
||||||
return link, headers
|
return link, headers
|
||||||
elif idx == 2:
|
elif "vikingfile" in best:
|
||||||
scrape_vikingfile(best)
|
scrape_vikingfile(best)
|
||||||
return None, None
|
return None, None
|
||||||
elif idx == 3:
|
elif "megadb" in best:
|
||||||
scrape_megadb(best)
|
scrape_megadb(best)
|
||||||
return None, None
|
return None, None
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user