Skip to content

Instantly share code, notes, and snippets.

@Shugabuga
Last active April 2, 2024 06:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shugabuga/c02ed8bf24c53b0ae7cf726e4ab7ed80 to your computer and use it in GitHub Desktop.
Save Shugabuga/c02ed8bf24c53b0ae7cf726e4ab7ed80 to your computer and use it in GitHub Desktop.
Parade: A utility to extract remote assets from the Kemono Friends 3 mobile game.
# Parade v1.0.1
# A utility to extract remote assets from the Kemono Friends 3 mobile game.
# © 2020 Shuga.
# Assets extracted from SEGA's servers. For use in Unity.
import csv, requests, os, io
# # Line to start at (zero-indexed).
# line = 1
# URL prefix. In case the URL changes in the future.
prefix = "https://parade-mobile-prod-cdn.kemono-friends-3.jp/AssetBundles/32.0/97e897a5c4d019b159c1678f2d9e7faa/32.0/iOS/1.0.0/ja/"
def main():
# Create the folder to hold the discovered assets.
if not os.path.exists("kemono_parade"):
os.makedirs("kemono_parade")
# Fetch the index file.
if not os.path.exists("kemono_parade/ab_list.tsv"):
print("Downloading index file from SEGA...")
req = requests.get(f"{prefix}ab_list.txt")
with open("kemono_parade/ab_list.tsv", "w") as listy:
listy.write(req.text)
print("Done!")
else:
print("Index file found locally!")
with open("kemono_parade/ab_list.tsv", "r") as tsvin:
tsvin = csv.reader(tsvin, delimiter='\t')
for row in tsvin:
if row[0] == "[EOF]":
break
else:
# Download asset.
getAsset(row[0])
def getAsset(url):
if not os.path.exists(f"kemono_parade/{url}"):
print(f"Downloading file: {url}")
resp = requests.get(f"{prefix}assets/{url}", headers={"User-Agent": "KemonoFriends3/1.5.1 CFNetwork/1179.0.1 Darwin/20.0.0", "Connection": "keep-alive", "X-Unity-Version": "2018.4.12f1", "Accept-Encoding": "gzip, deflate, br"})
file = io.BytesIO(resp.content)
with open(f"kemono_parade/{url}", "wb") as f:
f.write(file.getbuffer())
else:
print(f"File exists, skipping: {url}")
if __name__ == "__main__":
main()
@NamelessContributor
Copy link

@crash442337
Copy link

If you would be so kind as to give us some details on how to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment