libWiiPy.title.nus Module#

The libWiiPy.title.nus module provides support for downloading digital Wii titles from the Nintendo Update Servers. This module provides easy methods for downloading TMDs, common Tickets (when present), encrypted content, and the certificate chain.

Module Contents#

libWiiPy.title.nus.download_cert_chain(wiiu_endpoint: bool = False, endpoint_override: str = None) bytes#

Downloads the signing certificate chain used by all WADs. This uses System Menu 4.3U as the source.

Parameters:
  • wiiu_endpoint (bool, option) – Whether the Wii U endpoint for the NUS should be used or not. This increases download speeds. Defaults to False.

  • endpoint_override (str, optional) – A custom endpoint URL to use instead of the standard Wii or Wii U endpoints. Defaults to no override, and if set entirely overrides the “wiiu_endpoint” parameter.

Returns:

The cert file.

Return type:

bytes

libWiiPy.title.nus.download_content(title_id: str, content_id: int, wiiu_endpoint: bool = False, endpoint_override: str = None) bytes#

Downloads a specified content for the title specified in the object.

Parameters:
  • title_id (str) – The Title ID of the title to download content from.

  • content_id (int) – The Content ID of the content you wish to download.

  • wiiu_endpoint (bool, option) – Whether the Wii U endpoint for the NUS should be used or not. This increases download speeds. Defaults to False.

  • endpoint_override (str, optional) – A custom endpoint URL to use instead of the standard Wii or Wii U endpoints. Defaults to no override, and if set entirely overrides the “wiiu_endpoint” parameter.

Returns:

The downloaded content.

Return type:

bytes

libWiiPy.title.nus.download_contents(title_id: str, tmd: TMD, wiiu_endpoint: bool = False, endpoint_override: str = None) List[bytes]#

Downloads all the contents for the title specified in the object. This requires a TMD to already be available so that the content records can be accessed.

Parameters:
  • title_id (str) – The Title ID of the title to download content from.

  • tmd (TMD) – The TMD that matches the title that the contents being downloaded are from.

  • wiiu_endpoint (bool, option) – Whether the Wii U endpoint for the NUS should be used or not. This increases download speeds. Defaults to False.

  • endpoint_override (str, optional) – A custom endpoint URL to use instead of the standard Wii or Wii U endpoints. Defaults to no override, and if set entirely overrides the “wiiu_endpoint” parameter.

Returns:

A list of all the downloaded contents.

Return type:

List[bytes]

libWiiPy.title.nus.download_ticket(title_id: str, wiiu_endpoint: bool = False, endpoint_override: str = None) bytes#

Downloads the Ticket of the Title specified in the object. This will only work if the Title ID specified is for a free title.

Parameters:
  • title_id (str) – The Title ID of the title to download the Ticket for.

  • wiiu_endpoint (bool, option) – Whether the Wii U endpoint for the NUS should be used or not. This increases download speeds. Defaults to False.

  • endpoint_override (str, optional) – A custom endpoint URL to use instead of the standard Wii or Wii U endpoints. Defaults to no override, and if set entirely overrides the “wiiu_endpoint” parameter.

Returns:

The Ticket file from the NUS.

Return type:

bytes

libWiiPy.title.nus.download_title(title_id: str, title_version: int = None, wiiu_endpoint: bool = False, endpoint_override: str = None) Title#

Download an entire title and all of its contents, then load the downloaded components into a Title object for further use. This method is NOT recommended for general use, as it has absolutely no verbosity. It is instead recommended to call the individual download methods instead to provide more flexibility and output.

Parameters:
  • title_id (str) – The Title ID of the title to download.

  • title_version (int, optional) – The version of the title to download. Defaults to latest if not set.

  • wiiu_endpoint (bool, optional) – Whether the Wii U endpoint for the NUS should be used or not. This increases download speeds. Defaults to False.

  • endpoint_override (str, optional) – A custom endpoint URL to use instead of the standard Wii or Wii U endpoints. Defaults to no override, and if set entirely overrides the “wiiu_endpoint” parameter.

Returns:

A Title object containing all the data from the downloaded title.

Return type:

Title

libWiiPy.title.nus.download_tmd(title_id: str, title_version: int = None, wiiu_endpoint: bool = False, endpoint_override: str = None) bytes#

Downloads the TMD of the Title specified in the object. Will download the latest version by default, or another version if it was manually specified in the object.

Parameters:
  • title_id (str) – The Title ID of the title to download the TMD for.

  • title_version (int, option) – The version of the TMD to download. Defaults to latest if not set.

  • wiiu_endpoint (bool, option) – Whether the Wii U endpoint for the NUS should be used or not. This increases download speeds. Defaults to False.

  • endpoint_override (str, optional) – A custom endpoint URL to use instead of the standard Wii or Wii U endpoints. Defaults to no override, and if set entirely overrides the “wiiu_endpoint” parameter.

Returns:

The TMD file from the NUS.

Return type:

bytes