Package: ps4-updates
PS4 Title Update InformationThis package retrieves information about the latest update available for a PS4 title. The information is stored in aPs4TitleUpdateobject which you can integrate into your Python application. Alternatively it can print this information directly to the screen (for use in a simple CLI application), and it can save the retrieved information as files. This packagedoes notdownload entire PS4 title update files.Installationpip install ps4-updatesTypical UsageCreate aPs4TitleUpdateobject by specifying a PS4 Title Id (eg.CUSA00001_00orCUSA00001).Invokeget_update()on the object to begin retrieving information about the update. If an update is available it will try to retrieve the following:Title NameUpdate UrlCurrent VersionContent IdDownload SizeUpdate Creation Datechangeinfo.xml (developer included update notes)LimitationsOnly information about the current update version can be retrieved.It is not a guarantee that changeinfo.xml will be included within the updates pkg file. The file is typically located at the start of the file, however it does not appear to be in a fixed location. This package attempts to locate it by downloading up to the first 30MB of the pkg file. You can increase (or decrease) this search range by settingbyte_limitwhen creating aPs4TitleUpdateobject.Usage ExamplesCreatePs4TitleUpdateobject and retrieve update informationfromps4_updatesimporttitleasps4uptitle=ps4up.Ps4TitleUpdate('CUSA00001')title.get_update()Seeobject attributes reference.CreatePs4TitleUpdateobject, retrieve update information, and output to the screenfromps4_updatesimporttitleasps4uptitle=ps4up.Ps4TitleUpdate('CUSA00001')title.get_update()title.print_update_info()Console Outputvscode ➜ /workspaces/PS4-Updates-Python (main) $ python app.py
Title Id: CUSA00001
Update Url: http://gs-sec.ww.np.dl.playstation.net/plo/np/CUSA00001/1123f23c1f00810a5e43fcb409ada7823bc5ad21b357817e314b6c4832cf6f9f/CUSA00001-ver.xml
Title Name: THE PLAYROOM
Content Id: IP9100-CUSA00001_00-PLAYROOM00000000
Current Version: 01.07
Download Size: 34.88 MB
Creation Date: Sat, 25-Oct-2014

01.07
THE PLAYROOM VERSION 1.07

This update makes several stability improvements
to THE PLAYROOM.CreatePs4TitleUpdateobject, retrieve update information, and save to filefromps4_updatesimporttitleasps4uptitle=ps4up.Ps4TitleUpdate('CUSA00001')title.get_update()title.save_update_info()File System Output├── data_dump
│   └── CUSA00001
│       └── 01.07
│           ├── 20141025
│           ├── CUSA00001-ver.xml
│           ├── IP9100-CUSA00001_00-PLAYROOM00000000-A0107-V0100.json
│           └── changeinfo.xmlPs4TitleUpdateAttribute ReferenceThe following attributes are available on yourPs4TitleUpdateafter creation:NameDescriptiontitle_idPS4 Title Id object was created withupdate_urlUrl for accessing title updateAll of the remaining attributes will be available after invokingget_update()- if a title has an update available.You can also manually invoke_parse_update_xml(), which makes the following available:NameDescriptionupdate_existsTrueif the title has an updateupdate_sizeUpdate size as a formatted stringnameTitle namecontent_idTitle Content Idupdate_xmlFull XML response fromupdate_urlupdate_pkg_manifest_urlUrl for accessing package manifestYou can manually invoke_parse_update_pkg_json(), which makes the following available:NameDescriptionupdate_pkg_manifest_existsTrueifupdate_pkg_manifest_urlwas accessed successfullyupdate_pkg_manifest_jsonFull JSON response fromupdate_pkg_manifest_urlupdate_pkg_urlUrl for accessing update pkg fileYou can manually invoke_get_partial_pkg_file(), which makes the following available:NameDescriptionupdate_pkg_existsTrueif some data was found in pkg file atupdate_pkg_urlupdate_pkg_cdateUpdate creation date as string YYYYMMDDupdate_pkg_cdate_as_dateUpdate creation date as datetimechangeinfo_existsTrueif changeinfo.xml was foundchangeinfoList of dicts for each change in changeinfo.xmlchangeinfo_countNumber of changes in changeinfo.xmlchangeinfo_current_existsTrueif a change matching the current version number was in changeinfo.xmlchangeinfo_currentList of dicts for change matching the current versionchangeinfo_xmlFull XML for changeinfo.xmlAdditional ThanksZer0xFF- sharing the method for generating a title update URL