added emulation script i made in the past.
This commit is contained in:
parent
a0fabc2cc8
commit
7f331e4918
2 changed files with 36 additions and 0 deletions
12
emulation/README.md
Normal file
12
emulation/README.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
this folder contains some generic stuff i made for emulation, and this readme will go over the basic functionality of the files.
|
||||
should it not be kept up to date - you should be able to at least have an inkling of an idea of what they may do from their filenames alone
|
||||
|
||||
|
||||
# ps3updatedownloader.py
|
||||
|
||||
CLI Program
|
||||
this is a python script (as is shown by the filetype) that will intake a game ID and use playstations own servers to grab the update files for you. what you do with those files is up to you.
|
||||
to use it, just run it with anything above python 3.5, and have the pypi package requests available in some capacity.
|
||||
|
||||
|
||||
and thats it lol. get dunked on pal.
|
24
emulation/ps3updatedownloader.py
Normal file
24
emulation/ps3updatedownloader.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/python
|
||||
import requests
|
||||
|
||||
UUID = input("copy-paste the serial of the game to download updates for: ")
|
||||
updates = f"https://a0.ww.np.dl.playstation.net/tpl/np/{UUID}/{UUID}-ver.xml"
|
||||
xml = requests.get(updates, verify=False).text
|
||||
linkarray = []
|
||||
while True:
|
||||
start = xml.find('url="') + 5
|
||||
end = xml.find('.pkg"') + 4
|
||||
if start == 4 or end == 3:
|
||||
break
|
||||
pkg = xml[start:end]
|
||||
linkarray.append(pkg)
|
||||
xml = xml[end:]
|
||||
print(str(len(linkarray)) + " updates found")
|
||||
for item in linkarray:
|
||||
name = str(linkarray.index(item) + 1) + ".pkg"
|
||||
with requests.get(item,stream = True, verify=False) as r:
|
||||
r.raise_for_status()
|
||||
with open("./updates/" +name, "wb") as f:
|
||||
for chunk in r.iter_content(chunk_size=8192):
|
||||
f.write(chunk)
|
||||
print("finished: " + str(linkarray.index(item) + 1) + " of "+ str(len(linkarray)))
|
Loading…
Add table
Reference in a new issue