mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 17:59:43 +02:00
fix gofile downloads by adding custom headers to both direct dl and api request
still needs work: 1. fix restart causing the download to instantly jump to 100%
This commit is contained in:
@@ -68,10 +68,6 @@ def scrape_steamrip_game_downloads(gamelink):
|
||||
download_links[0] = "https:" + pure
|
||||
if pure[2] == "g":
|
||||
download_links[1] = "https:" + pure
|
||||
if pure[2] == "v":
|
||||
download_links[2] = "https:" + pure
|
||||
if pure[2] == "m":
|
||||
download_links[3] = "https:" + pure
|
||||
|
||||
ret = []
|
||||
|
||||
@@ -93,13 +89,15 @@ def get_download_link(post: Dict):
|
||||
break
|
||||
|
||||
if links.index(best) == 0:
|
||||
return scrape_buzzheavier(best)
|
||||
link = scrape_buzzheavier(best)
|
||||
return link
|
||||
elif links.index(best) == 1:
|
||||
return scrape_gofile(best)
|
||||
link, headers = scrape_gofile(best)
|
||||
return link, headers
|
||||
else:
|
||||
consoleLog("Unable to retrieve download link due to captcha, launching browser...")
|
||||
webbrowser.open(best)
|
||||
return None
|
||||
return None, None
|
||||
|
||||
def filter_steamrip(query: str):
|
||||
games = scrape_steamrip_links()
|
||||
@@ -120,4 +118,4 @@ Metadata = {
|
||||
}
|
||||
|
||||
def init_steamrip():
|
||||
state.trackers.update({Metadata["name"] : Metadata})
|
||||
state.trackers.update({Metadata["name"] : Metadata})
|
||||
|
||||
Reference in New Issue
Block a user