majd / ipatool

Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store
MIT License
5.37k stars 470 forks source link

Download with numeric AppStore ID #115

Closed sqeezelemon closed 1 year ago

sqeezelemon commented 1 year ago

Description

Bundle IDs are a bit trickier to find, would be nice if the CLI could support app store IDs (id... at the end of an app store page url) instead of a bundle ID. Perhaps this could even be extended to downloading using the app store URL. Example: https://apps.apple.com/us/app/google/id284815942 -> ID = 284815942

Possible implementation:

  1. Get the ID as an argument to the download command
  2. Use /lookup to get the bundle id:
    https://itunes.apple.com/lookup?id=<ID>&country=<COUNTRY>
  3. Get the bundle ID from the bundleId parameter in the json response
  4. Business as usual
majd commented 1 year ago

I'd rather keep the CLI simple and not clutter it with another identifier parameter.

You can achieve the same effect by chaining multiple commands with ipatool.

$ echo 284815942 | awk '{print "http://itunes.apple.com/lookup?id="$1}' | xargs curl -s | jq -r '.results | first | .bundleId' | xargs ipatool download -b