Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mjishnu committed Jul 28, 2023
1 parent 3ff7b9d commit 72c911c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from utls import Worker

script_dir = os.path.dirname(os.path.abspath(__file__))
clr.AddReference(script_dir + r"\data\System.Management.Automation.dll")
clr.AddReference(fr"{script_dir}\data\System.Management.Automation.dll")


class internal_func(Ui_MainProgram):
Expand Down
10 changes: 3 additions & 7 deletions app/modules/url_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ def greater_ver(arg1, arg2):
release_type = "Retail"

# getting the encrypted cookie for the fe3 delivery api
GetCookie_path = os.path.join(parent_dir, r"data\xml\GetCookie.xml")
with open(GetCookie_path, "r") as f:
with open(fr"{parent_dir}\data\xml\GetCookie.xml", "r") as f:
cookie_content = f.read()
check(Event)
out = session.post(
Expand All @@ -237,9 +236,7 @@ def greater_ver(arg1, arg2):

# getting the update id,revision number and package name from the fe3 delivery api by providing the encrpyted cookie, cat_id, realse type
# Map {"retail": "Retail", "release preview": "RP","insider slow": "WIS", "insider fast": "WIF"}
WUIDRequest_path = os.path.join(
parent_dir, r"data\xml\WUIDRequest.xml")
with open(WUIDRequest_path, "r") as f:
with open(fr"{parent_dir}\data\xml\WUIDRequest.xml", "r") as f:
cat_id_content = f.read().format(cookie, cat_id, release_type)
check(Event)
out = session.post(
Expand Down Expand Up @@ -287,8 +284,7 @@ def greater_ver(arg1, arg2):
final_dict[value] = identities[value]

# getting the download url for the files using the api
FE3FileUrl_path = os.path.join(parent_dir, r"data\xml\FE3FileUrl.xml")
with open(FE3FileUrl_path, "r") as f:
with open(fr"{parent_dir}\data\xml\FE3FileUrl.xml", "r") as f:
file_content = f.read()

file_dict = {} # the final result
Expand Down

0 comments on commit 72c911c

Please sign in to comment.