GithubHelp home page GithubHelp logo

ipatool-py's Introduction

IPATool-py

Python version of IPATool!

Now Supports:

  • Purchasing App via --purchase
  • Downloading Old IPA via iTunes Server

Installation

pip3 install -r requirements.txt

Usage

There're three commands: lookup, historyver, download. Each command's usage can be found by -h option.

You can also chain multiple command, last command's output will be passed to next command (so you don't need to supply some arguments like appVerId)

Download Newest Version

Download an app using bundleID (-o can be omited)

python3 main.py lookup -b com.touchingapp.potatsolite -c JP download -e APPLE_EMAIL -p APPLE_PWD -o DIR

Or appID (XXXXX in the apps.apple.com/app/xxxx/idXXXXXX)

python3 main.py download -i XXXXX

You can also purchase apps when downloading using --purchase:

python3 main.py lookup -b com.touchingapp.potatsolite -c JP download --purchase -e APPLE_EMAIL -p APPLE_PWD -o DIR

Download OLD Version

Old versions must be downloaded together with iTunes Server. You can get iTunes Server in several ways:

After setting up the server, you can run this tool to download a specific version

python3 main.py lookup -b com.touchingapp.potatsolite -c JP download -s http://127.0.0.1:9000 --appVerId 833889087

NOTE: Some users are reporting that you need to authorize computer and make first purchase in iTunes with marked "do not ask for password" before using the iTunes server. (See #26)

Get History Ver (usually used together with JSON)

Get all appVerId of app from Apple

python3 main.py lookup -b com.touchingapp.potatsolite -c JP historyver -e APPLE_EMAIL -p APPLE_PWD

Lookup (usually used together with JSON)

Query app basic information:

  • By bundleID: python3 main.py lookup -b com.touchingapp.potatsolite -c JP
  • By appID: python3 main.py lookup -i 1239860606 -c JP

Query appVerId:

python3 main.py lookup -b com.touchingapp.potatsolite -c JP --get-verid

Headless Usage

For each command you can use --json switch to get result of command in JSON

python3 main.py --json lookup -b com.touchingapp.potatsolite -c JP --get-verid
python3 main.py --json lookup -b com.touchingapp.potatsolite -c JP historyver -e APPLE_EMAIL -p APPLE_PWD

For Large Scale Scraping

You can download all versions of an app like this:

python3 main.py --json download --itunes-server http://XXX.XXX.XXX.XXX:9000 --appId 414478124 --purchase --downloadAllVersion
  • In this mode, errors will only be logged instead of interrupting the whole process
  • For each downloaded app version, it will output a line of json in stdout like this:
    {"appName": "WeChat", "appBundleId": "com.tencent.xin", "appVer": "6.5.13.34", "appId": 414478124, "appVerId": 822899148, "downloadedIPA": "wechat\\com.tencent.xin-6.5.13.34-414478124-822899148.ipa", "downloadedVerId": 822899148}
    
    Logs will only be printed to stderr, so you can parse this line for automation.

Development

  • All requests' reqBody and respBody are modeled using modified JSONSchema2PoPo2 (see my NyaMisty/JSONSchema2PoPo2), you can regenerate the binding by cd into reqs/schemas and execute python3 -m schema_defs
  • See more information on how to generate schema in reqs/schemas directory

Credit

  • Thanks @majd's ipatool, which is written in swift

ipatool-py's People

Contributors

davipt avatar lessica avatar nyamisty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipatool-py's Issues

Error downloading old versions of apps

getting this error when trying to download old versions of apps

Store buyProduct failed! Message: Sign-In Required (errorType
2072-MZCommerce.ASN.ExpiredPasswordToken)

License not found exception handing broken

Hi, first of all, thank you for this great tool!

I think that there has been a regression between 1f4d9b0 and a8b2d37 ( compare ).

When downloading without the new --purchase option a not previously purchased item, the exception handling itself fails.

In particular, the change from

raise StoreException("download", resp.customerMessage, resp.failureType)

to

raise StoreException("volumeStoreDownloadProduct", resp, resp.customerMessage, resp.failureType + '-' + resp.metrics.dialogId)

Seems to be the cause.

When debugging with pdb, I can inspct the resp object, which seems to have a its metrics field set to None:

<Class StoreDownloadResp. pings: [], cancel_purchase_batch: True, customerMessage: 'License not found', failureType: '9610', jingleDocType: None, jingleAction: None, status: None, dsPersonId: None, creditDisplay: None, creditBalance: None, freeSongBalance: None, authorized: None, download_queue_item_count: None, songList: None, metrics: None, subscriptionStatus: None>

Once again, thank you for this great and useful tool and for adding the purchase option!
All the best, tuxmind.

How to log in?

[11:18:23] CRITICAL Store authenticate failed! Message: MZFinance.BadLogin.Configurator_message main.py:321
CRITICAL Raw Response: {'pings': [], 'failureType': '', 'customerMessage': main.py:322
'MZFinance.BadLogin.Configurator_message', 'm-allowed': False, 'cancel-purchase-batch':
True}
My apple id have 2 Factor Authentication enabled but i don't find a solution to turn it off.
Any helps with the login?

Can I purchase a paid app?

I tried

python3 main.py lookup -b ch.threema.iapp -c IT download --purchase -e [email protected] -p password     
[18:36:50] INFO     Looking up app in country IT with BundleID BundleID ch.threema.iapp                                                                                                                                                                        main.py:147
           INFO     Found app:                                                                                                                                                                                                                                 main.py:154
                            Name: Threema. App messaggi sicura                                                                                                                                                                                                            
                            Version: 4.8.1                                                                                                                                                                                                                                
                            bundleId: ch.threema.iapp                                                                                                                                                                                                                     
                            appId: 578665578                                                                                                                                                                                                                              
           INFO     Logging into iTunes...                                                                                                                                                                                                                     main.py:197
[18:36:52] INFO     Logged in as Foo User                                                                                                                                                                                                                main.py:200
           INFO     Try to purchasing appId 578665578 

but I received this

Traceback (most recent call last):
  File "/Users/iosfora/Desktop/ipatool-py/main.py", line 325, in <module>
    main()
  File "/Users/iosfora/Desktop/ipatool-py/main.py", line 323, in main
    tool.tool_main()
  File "/Users/iosfora/Desktop/ipatool-py/main.py", line 131, in tool_main
    args.func(args)
  File "/Users/iosfora/Desktop/ipatool-py/main.py", line 252, in handleDownload
    Store.purchase(self.appId)
  File "/Users/iosfora/Desktop/ipatool-py/reqs/store.py", line 169, in purchase
    return self.buyProduct_purchase(appId)
  File "/Users/iosfora/Desktop/ipatool-py/reqs/store.py", line 162, in buyProduct_purchase
    resp.status + '-' + resp.jingleDocType)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Anyway this works

python3 main.py lookup -b ph.telegra.Telegraph -c IT download --purchase -e [email protected] -p password
[18:35:32] INFO     Looking up app in country IT with BundleID BundleID ph.telegra.Telegraph                                                                                                                                                                   main.py:147
[18:35:33] INFO     Found app:                                                                                                                                                                                                                                 main.py:154
                            Name: Telegram Messenger                                                                                                                                                                                                                      
                            Version: 9.0.1                                                                                                                                                                                                                                
                            bundleId: ph.telegra.Telegraph                                                                                                                                                                                                                
                            appId: 686449807                                                                                                                                                                                                                              
           INFO     Logging into iTunes...                                                                                                                                                                                                                     main.py:197
[18:35:35] INFO     Logged in as Foo User                                                                                                                                                                                                               main.py:200
           INFO     Try to purchasing appId 686449807                                                                                                                                                                                                          main.py:250
[18:35:36] WARNING  You have already purchased appId 686449807 before                                                                                                                                                                                          main.py:255
           INFO     Retriving download info for appId 686449807                                                                                                                                                                                                main.py:259
[18:35:37] INFO     Downloading app Telegram (ph.telegra.Telegraph) with appId 686449807 (version 9.0.1, versionId 852359203)                                                                                                                                  main.py:274
           INFO     Downloading ipa to ./ph.telegra.Telegraph-9.0.1-686449807-852359203.ipa                                                                                                                                                                    main.py:285
[18:35:40] INFO     Download progress: 5.92% (  5.0M / 84.5M)                                                                                                                                                                                                   main.py:53
[18:35:42] INFO     Download progress: 11.83% ( 10.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:43] INFO     Download progress: 17.75% ( 15.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:45] INFO     Download progress: 23.66% ( 20.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:46] INFO     Download progress: 29.58% ( 25.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:49] INFO     Download progress: 35.49% ( 30.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:50] INFO     Download progress: 41.41% ( 35.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:51] INFO     Download progress: 47.32% ( 40.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:53] INFO     Download progress: 53.24% ( 45.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:54] INFO     Download progress: 59.16% ( 50.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:56] INFO     Download progress: 65.07% ( 55.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:35:58] INFO     Download progress: 70.99% ( 60.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:36:00] INFO     Download progress: 76.90% ( 65.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:36:02] INFO     Download progress: 82.82% ( 70.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:36:04] INFO     Download progress: 88.73% ( 75.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:36:06] INFO     Download progress: 94.65% ( 80.0M / 84.5M)                                                                                                                                                                                                  main.py:53
[18:36:07] INFO     Download progress: 100.00% ( 84.5M / 84.5M)                                                                                                                                                                                                 main.py:53
           INFO     Writing out iTunesMetadata.plist...                                                                                                                                                                                                        main.py:288
           INFO     Downloaded ipa to ph.telegra.Telegraph-9.0.1-686449807-852359203.ipa 

In particular I want to buy this new app and I have already added necessary money to my Apple ID.

Edit

After applied this PR I get another error

[20:16:08] CRITICAL Store buyProduct_purchase failed! Message: Purchase of this item is not currently available. (errorType None-None)                                                                                       main.py:211
           CRITICAL     Raw Response: {'pings': [], 'metrics': {'dialogId': 'MZCommerce.PriceMismatch', 'message': 'Purchase of this item is ', 'messageCode': '2019', 'options': ['OK'], 'actionUrl':                       main.py:212
                    'p25-buy.itunes.apple.com/WebObjects/MZBuy.woa/wa/buyProduct', 'asnState': 0, 'eventType': 'dialog'}, 'cancel-purchase-batch': True, 'failureType': '2019', 'customerMessage': 'Purchase of this item is            
                    not currently available.', 'm-allowed': False, 'dialog': {'m-allowed': False, 'isFree': True, 'message': 'Purchase of this item is not currently available.', 'explanation': 'This item is being                    
                    modified. Please try again later.', 'defaultButton': 'ok', 'okButtonString': 'OK', 'initialCheckboxValue': True}} 

Unable to purchase app

Error when trying to download purchase ipa

Traceback (most recent call last):
File "/home/npham/ipatool-py/main.py", line 325, in
main()
File "/home/npham/ipatool-py/main.py", line 323, in main
tool.tool_main()
File "/home/npham/ipatool-py/main.py", line 131, in tool_main
args.func(args)
File "/home/npham/ipatool-py/main.py", line 252, in handleDownload
Store.purchase(self.appId)
File "/home/npham/ipatool-py/reqs/store.py", line 169, in purchase
return self.buyProduct_purchase(appId)
File "/home/npham/ipatool-py/reqs/store.py", line 162, in buyProduct_purchase
resp.status + '-' + resp.jingleDocType)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Pls help me!

Add —download-all-versions

Add this command to download all versions of the app as ( id(app bundle ID), app com.something.something or app name)-(version ID or version number) for each version, and failed downloads are skipped and added as the IPA’s would be name but it is .error log.txt .

Purchase couldn’t be completed

getting the following error:

re buyProduct_purchase failed! Message: Purchase couldn’t be completed. (errorType None-None)                                                               main.py:321
           CRITICAL     Raw Response: {'pings': [], 'metrics': {'dialogId': 'MZCommerce.ProductNotForSale', 'message': 'Purchase couldn’t be comp', 'messageCode': '2059',         main.py:322
                    'options': ['OK'], 'actionUrl': 'buy.itunes.apple.com/WebObjects/MZBuy.woa/wa/buyProduct', 'asnState': 0, 'mtTopic': 'xp_its_main', 'eventType': 'dialog'},
                    'failureType': '2059', 'customerMessage': 'Purchase couldn’t be completed.', 'm-allowed': False, 'dialog': {'m-allowed': False, 'isFree': True, 'message':
                    'Purchase couldn’t be completed.', 'explanation': 'Check the item and try again.', 'defaultButton': 'ok', 'okButtonString': 'OK', 'initialCheckboxValue':
                    True}}

execute the following:
python3 main.py lookup -i 1280548773 -c us download --purchase -e mail -p pass

Unable to download old version of apps

After struggling to make the server work i stumble upon this issue when i tried to download an old version of an app to test out the tool:

Traceback (most recent call last):
  File "D:\Downloads\IPA Downloaders\ipatool-py\main.py", line 325, in <module>
    main()
  File "D:\Downloads\IPA Downloaders\ipatool-py\main.py", line 323, in main
    tool.tool_main()
  File "D:\Downloads\IPA Downloaders\ipatool-py\main.py", line 131, in tool_main
    args.func(args)
  File "D:\Downloads\IPA Downloaders\ipatool-py\main.py", line 261, in handleDownload
    downResp = Store.download(self.appId, self.appVerId)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Downloads\IPA Downloaders\ipatool-py\reqs\store.py", line 173, in download
    return self.buyProduct(appId, appVer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Downloads\IPA Downloaders\ipatool-py\reqs\store.py", line 92, in buyProduct
    itunes_internal = self.iTunes_provider(url)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Downloads\IPA Downloaders\ipatool-py\main.py", line 180, in handle_iTunes_provider
    r = requests.get(servUrl, params={
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\TOSHIBA\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\TOSHIBA\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\TOSHIBA\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 575, in request
    prep = self.prepare_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\TOSHIBA\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 486, in prepare_request
    p.prepare(
  File "C:\Users\TOSHIBA\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 368, in prepare
    self.prepare_url(url, params)
  File "C:\Users\TOSHIBA\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 445, in prepare_url
    raise InvalidURL(f"Invalid URL {url!r}: No host supplied")
requests.exceptions.InvalidURL: Invalid URL 'http:127.0.0.1:9000': No host supplied

Error on buy product

I have error with kbsync from iPhone

Store buyProduct failed! Message: main.py:205
MZCommerce.ConfirmPaymentSheet_message (errorType
-MZCommerce.ConfirmPaymentSheet)

Suddenly facing this issue. Any help would be appreciated. IPTool is still working but not IPATool-py MZFinance

[16:03:41] INFO     Looking up app in country US with BundleID       main.py:147
                    BundleID com.mixcloud.iphone                                
[16:03:42] INFO     Found app:                                       main.py:154
                            Name: Mixcloud - Music, Mixes & Live                
                            Version: 35.4.8                                     
                            bundleId: com.mixcloud.iphone                       
                            appId: 401206431                                    
           INFO     Logging into iTunes...                           main.py:197
[16:03:43] CRITICAL Store authenticate failed! Message:              main.py:205
Traceback (most recent call last):
  File "/Users/manpreet/ipatool-py/main.py", line 247, in handleDownload
    Store = self._get_StoreClient(args)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/manpreet/ipatool-py/main.py", line 199, in _get_StoreClient
    Store.authenticate(appleid, applepass)
  File "/Users/manpreet/ipatool-py/reqs/store.py", line 44, in authenticate
    raise StoreException("authenticate", resp.customerMessage, resp.failureType)
reqs.store.StoreException: Store authenticate error: 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/manpreet/ipatool-py/main.py", line 325, in <module>
    main()
  File "/Users/manpreet/ipatool-py/main.py", line 323, in main
    tool.tool_main()
  File "/Users/manpreet/ipatool-py/main.py", line 131, in tool_main
    args.func(args)
  File "/Users/manpreet/ipatool-py/main.py", line 318, in handleDownload
    self._handleStoreException(e)
  File "/Users/manpreet/ipatool-py/main.py", line 206, in _handleStoreException
    logger.fatal("    Raw Response: %s" % (e.resp.as_dict()))
                                           ^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'as_dict'

Add —download-all-versions

Add this command to download all versions of the app as ( id(app bundle ID), app com.something.something or app name)-(version ID or version number) for each version, and failed downloads are skipped and added as the IPA’s would be name but it is .error log.txt .

Add —write-metadata

Add a flag that writes metadata:

  1. Screenshots for all platforms and reviews in their original format. as (ipa name).screenshot-(number).(format) and a single (ipa name).screenshot-info.json with the original URLs of the screenshots and the platforms their on as well as links to the videos.
  2. Reviews as a (ipa name).reviews.json with the review content, star rating, age, and title. If an app has more than 1000 reviews you need to use the —write-all-reviews to write all of them.
  3. Icon as a (ipa name).icon.(file format)
  4. Description as a (ipa name).description.txt
  5. Version history as a .versionhistory.json with number, date, and developer description with bullets
  6. Privacy information about the app gets written to .privacypolicy.json
  7. Miscellaneous fields like app size, category, developer name, developer ID, ratings without a review, etc go to .info.json .

Trying to use with KbsyncTool, no remote port found error

I am trying to download an old app version using kbsynctool on a jailbroken idevice. I get this error output on the script:

File "contrib-ipatool-py/main.py", line 474, in
main()
File "contrib-ipatool-py/main.py", line 472, in main
tool.tool_main()
File "contrib-ipatool-py/main.py", line 163, in tool_main
args.func(args)
File "contrib-ipatool-py/main.py", line 355, in handleDownload
self.downloadOne(args)
File "contrib-ipatool-py/main.py", line 377, in downloadOne
downResp = Store.download(self.appId, self.appVerId, isRedownload=not args.purchase)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "contrib-ipatool-py/reqs/store.py", line 252, in download
return self.buyProduct(appId, appVer, pricingParameters='STDRDL' if isRedownload else 'STDQ')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "contrib-ipatool-py/reqs/store.py", line 163, in buyProduct
itunes_internal = self.iTunes_provider(url)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "contrib-ipatool-py/main.py", line 226, in handle_iTunes_provider
kbsync = bytes.fromhex(ret.pop('kbsync'))
^^^^^^^^^^^^^^^^^
KeyError: 'kbsync'

Also in the ios terminal app, I get the error:
no remote port found

The command I try to execute is:
python3 main.py lookup -b com.foo.bar -c XX download -s http://XXX.XXX.X.XX:9000/ --appVerId 12345678

download failed

always return :Store download failed! Message: License not found (errorType 9610)

New Errors

Hey,
i am getting this new error if i try to download the com.ea.simpsonssocial.inc2 IPA with the purchase option.

<Class StoreBuyproductResp. pings: [], jingleDocType: None, jingleAction: None, status: None, dsPersonId: None, creditDisplay: None, creditBalance: None, freeSongBalance: None, creditDisplayInternal: None, authorized: None, download_ queue_item_count: None, songList: None, download_queue_info: None, metrics: <Class _metri...ype: 'dialog'>, duAnonymousPings: None, subscriptionStatus: None, cancel_purchase_batch: None, failureType: '2059', customerMessage: 'This it em is... unavailable.', m_allowed: False, dialog: <Class _dialo...oxValue: True>> Traceback (most recent call last): File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\main.py", line 326, in <module> main() File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\main.py", line 324, in main tool.tool_main() File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\main.py", line 131, in tool_main args.func(args) File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\main.py", line 252, in handleDownload Store.purchase(self.appId) File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\reqs\store.py", line 175, in purchase return self.buyProduct_purchase(appId) File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\reqs\store.py", line 168, in buyProduct_purchase resp.status + '-' + resp.jingleDocType) TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' '

If i try to download it without the purchase option ill get this error:

<Logger main (INFO)> <Class StoreDownloadResp. pings: [], cancel_purchase_batch: True, customerMessage: 'License not found.', failureType: '9610', jingleDocType: None, jingleAction: None, status: None, dsPersonId: None, creditDisplay: None, creditBalance : None, freeSongBalance: None, authorized: None, download_queue_item_count: None, songList: None, metrics: None, subscriptionStatus: None> Traceback (most recent call last): File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\main.py", line 326, in <module> main() File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\main.py", line 324, in main tool.tool_main() File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\main.py", line 131, in tool_main args.func(args) File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\main.py", line 261, in handleDownload downResp = Store.download(self.appId, self.appVerId) File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\reqs\store.py", line 181, in download return self.volumeStoreDownloadProduct(appId, appVer) File "C:\Users\hacker\PycharmProjects\pythonProject1\ipa\reqs\store.py", line 87, in volumeStoreDownloadProduct resp.failureType + '-' + resp.metrics.dialogId) AttributeError: 'NoneType' object has no attribute 'dialogId'
Any idea ?

2fa

i cant use 2fa needs code

2FA Crash.

Password+2FA not work.

Traceback (most recent call last):
File "main.py", line 247, in handleDownload
Store = self._get_StoreClient(args)
File "main.py", line 199, in _get_StoreClient
Store.authenticate(appleid, applepass)
File "/private/tmp/ipatool-py-master/reqs/store.py", line 44, in authenticate
raise StoreException("authenticate", resp.customerMessage, resp.failureType)
reqs.store.StoreException: Store authenticate error:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 325, in
main()
File "main.py", line 323, in main
tool.tool_main()
File "main.py", line 131, in tool_main
args.func(args)
File "main.py", line 318, in handleDownload
self._handleStoreException(e)
File "main.py", line 206, in _handleStoreException
logger.fatal(" Raw Response: %s" % (e.resp.as_dict()))
AttributeError: 'str' object has no attribute 'as_dict'

Apps without Manifest.plist results in crash

First, I would like to mention that I am using the action-iTunes-header method in a VM, in case this is important.

Lots of (older) apps do not have a Manifest.plist file in SC_Info. One example of such an app I have chosen is this app. The tool assumes the file always exists and uses it to get the names of .sinf files. Because of this, the program crashes with the following message when downloading these apps:
KeyError: "There is no item named 'Payload/tic-tac-toe.app/SC_Info/Manifest.plist' in the archive"

On line 298:
scManifestData = ipaFile.read(appContentDir + '/SC_Info/Manifest.plist')

Some form of check would need to be put in place to ensure Manifest.plist exists, and if it does not use a different method to obtain .sinf files. I think that CFBundleExecutable from info.plist is the name for the .sinf, but I would need to perform more research or testing to confirm this.

Unable to purchase an app + Readme issue

Getting MZCommerce.PriceMismatch error - so unable to purchase paid apps

Also you need to mention in readme that user needs to authorise computer and make first purchase in iTunes with marked "do not ask for password" checkbox, otherwise this error throws: MZCommerce.ConfirmationNeededForOneClickBuy.SoftwareApplication, it is not handled in your code.

Automatically obtain license

Is this possible that this script automatically obtains a license by simulating the purchase? For free apps only. If you can add that feature, that'd be super cool. Thank you so much for your great contribution.

Downloading old versions of delisted apps

As the title says i want to download some old versions of delisted apps that i have in my purchased history some are not even there but i still can download the latest version of them using -e APPLE_ID -p PASSWORD but when i add --appVerId it doesn't use it at all it will download the latest version of that app the -s ITUNES_SERVER argument only works on apps that aren't delisted so is there any way for me to download old version using this tool or do i need to use other methods?

Local history ver cache not loaded.

When I first use this command, it cheerfully yields the history version as expected. But, on second use — instead of the history, it hands over the app info.

It seems to be making an attempt to load the cache, but alas, the cache seems to be playing hard to get!

python main.py --json lookup -b com.apple.TestFlight -c CN historyver -e '[email protected]' -p 'password,'
local cache file 'historyver_899247664.json' not exists:

[10:58:44] INFO     Got available version ids [630253062, 645542704, 651054161,          main.py:379
                    700332690, 784113046, 811140270, 812173678, 812241249, 812877953,               
                    813474345, 813475083, 813477241, 814090914, 814091718, 814100661,               
                    816044383, 816420668, 817380042, 817710177, 818714024, 819084323,               
                    821639496, 822406443, 823499252, 825211114, 827626291, 827837998,               
                    828101417, 828584567, 828749284, 829166450, 829270642, 829952640,               
                    830660676, 831189872, 831741409, 832729798, 833937131, 836424318,               
                    838507767, 840116402, 842859443, 844214549, 851132243, 853126007,               
                    854344973, 854964595, 856134955, 856819239, 857115950, 858856015,               
                    860528408, 862338589, 863658435]                                                
{"appVerIds": [630253062, 645542704, 651054161, 700332690, 784113046, 811140270, 812173678, 812241249, 812877953, 813474345, 813475083, 813477241, 814090914, 814091718, 814100661, 816044383, 816420668, 817380042, 817710177, 818714024, 819084323, 821639496, 822406443, 823499252, 825211114, 827626291, 827837998, 828101417, 828584567, 828749284, 829166450, 829270642, 829952640, 830660676, 831189872, 831741409, 832729798, 833937131, 836424318, 838507767, 840116402, 842859443, 844214549, 851132243, 853126007, 854344973, 854964595, 856134955, 856819239, 857115950, 858856015, 860528408, 862338589, 863658435]}

local cache file 'historyver_899247664.json' exists:

{"name": "TestFlight", "version": "3.5.1", "appId": 899247664, "bundleId": "com.apple.TestFlight"}```

Add —write-metadata

Add a flag that writes metadata by grabbing it from the App Store html page:

  1. Screenshots for all platforms and reviews in their original format. as (ipa name).screenshot-(number).(format) and a single (ipa name).screenshot-info.json with the original URLs of the screenshots and the platforms their on as well as links to the videos.
  2. Reviews as a (ipa name).reviews.json with the review content, star rating, age, and title. If an app has more than 1000 reviews you need to use the —write-all-reviews to write all of them.
  3. Icon as a (ipa name).icon.(file format)
  4. Description as a (ipa name).description.txt
  5. Version history as a .versionhistory.json with number, date, and developer description with bullets
  6. Privacy information about the app gets written to .privacypolicy.json
  7. Miscellaneous fields like app size, category, developer name, developer ID, ratings without a review, etc go to .info.json .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.