Skip to content

Commit

Permalink
fix auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
KingKDot committed Apr 18, 2023
1 parent aa6e918 commit 650c297
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions util/plugins/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@

def search_for_updates():
# Will add back soon
return
clear()
setTitle("Hazard Nuker Checking For Updates. . .")
r = requests.get("https://github.com/Rdimo/Hazard-Nuker/releases/latest")
r = requests.get("https://github.com/KDot227/hazard-nuker-mirror/releases/latest")

soup = str(BeautifulSoup(r.text, "html.parser"))
s1 = re.search("<title>", soup)
Expand All @@ -44,7 +43,9 @@ def search_for_updates():
end="\n\n",
)
soup = BeautifulSoup(
requests.get("https://github.com/Rdimo/Hazard-Nuker/releases").text,
requests.get(
"https://github.com/KDot227/hazard-nuker-mirror/releases"
).text,
"html.parser",
)
for link in soup.find_all("a"):
Expand Down Expand Up @@ -82,7 +83,7 @@ def search_for_updates():
# if they are running hazard source code
else:
new_version_source = requests.get(
"https://github.com/Rdimo/Hazard-Nuker/archive/refs/heads/master.zip"
"https://github.com/KDot227/hazard-nuker-mirror/archive/refs/heads/main.zip"
)
with open("Hazard-Nuker-master.zip", "wb") as zipfile:
zipfile.write(new_version_source.content)
Expand Down

0 comments on commit 650c297

Please sign in to comment.