Jump to content

Fetcher - A simple python script wrote to filter appstore results.


1 post in this topic

Recommended Posts

Updated (edited)

Fetcher

Made only Json & Requests

Fetcher is a light weight, python script that also outputs all data to a text file in a formatted manor. I will probably update this once or twice.

Cant post on git because they deleted my main github :/

This color means default or contextual text.

It can be used to

  1. Sort versions from highest to lowest
  2. Search for apps via terms ("Last day on Earth")
  3. Custom entity input ("software,iPadSoftware")
  4. Version sorting (BUGGY, I wouldnt really call this a feature bc of its state but its here anyway)
  5. Search w/ country codes ("US")
  6. Limit results
  7. Search results via Genre ("Games")
  8. Filters any junk data from results (art work, description etc)
  9. Callback support (edit the code as it wasn't built with it in mind)

Might be buggy, not gonna always sort things well. Will try its best <3.

Plans:

  1. Almost 0 Plans for this. Might add more sorting/filters to the script.

Installing requests:

  Quote

pip install requests

Expand  

 

Code:

import json
import os
import time
import requests

DEBUG = False
PRINT_RESPONSE = False # recommeneded as false because lots of data

def filter(data):
    if not isinstance(data, list):
        raise ValueError("Input data should be a list of dictionaries.")
    
    filtered_data = []
    for item in data:
        if isinstance(item, dict):
            # items to filter, copy paste
            filtered_item = {
                "currentVersionReleaseDate": item.get("currentVersionReleaseDate"),
                "primaryGenreName": item.get("primaryGenreName"),
                "bundleId": item.get("bundleId"), # "com.attackgalaxyshooter.galaxyspaceshooter2020"
                "sellerName": item.get("sellerName"),
                "version": item.get("version"),
                "trackName": item.get("trackName"), # "Galaxy War: Space Shooter"
                "kind": item.get("kind"), # software
                "releaseDate": item.get("releaseDate"),
                "collectionViewUrl": item.get("collectionViewUrl"),
                "genres": item.get("genres"),
            }
            if DEBUG: print(json.dumps(filtered_item, indent=4))
            filtered_data.append(filtered_item)
        else:
            print(f"Skipping item, not a dictionary: {item}")
    return filtered_data


def sorter(data, target, high=False):
    try:

        s = sorted(data, key=lambda x: x[target], reverse=high)

        if DEBUG:
            print(json.dumps(s, indent=4))

        return s
    except Exception as err:
        print(f"[!] Error while sorting: {err}")
        exit(1)

def sortGenre(data, target, includeAllMatching = False):
    sorted_genres = [] # store here
    
    for genre in data:
        
        if isinstance(genre, dict):
        
            genre_name = genre.get('primaryGenreName')
            genre_list = genre.get('genres')

            # look for all that match the target
            if includeAllMatching: 
                if genre_name == target or target in genre_list: 
                    sorted_genres.append(genre)
            else:
                # only get the matching primaryGenreName
                if genre_name == target:
                    sorted_genres.append(genre)

    return sorted_genres

def sortVer(data, high=False):
    return sorter(data, 'version', high)

def versortCheck(data):
    shouldVerSort = str(input("Sort version? (y/n): ")).upper()

    if shouldVerSort == "Y" or shouldVerSort == "YES":
            
        sortHigh = str(input("Sort version High? (y/n) (n = low -> high): ")).upper()
            
        if sortHigh == "Y" or sortHigh == "YES":
            return sortVer(data, True)
        elif sortHigh == "N" or sortHigh == "NO":
            return sortVer(data, False)
        else:
            return data
    else:
        return data

def gensortCheck(data, target):
    shouldGenSort = str(input(f"Sort Genre by {target}? (y/n): ")).upper()

    if shouldGenSort == "Y" or shouldGenSort == "YES":
        return sortGenre(data, target)
    else:
        return data # since they dont want to genre sort we will then return the data as it is

def save(data, output):
    
    with open(output, 'a+') as f:
        
        if f.writable:
            f.write(json.dumps(data, indent=4))
            f.close()
        
            if f.closed:
                print(f"[+] File was closed and wrote to {output}")
            else:
                ValueError(f"[!] Issue checking if the file is closed successfully. Please make sure you/the program has sufficent privs.")
        
        else:
            ValueError(f"[!] Cannot write to {output}")

def main():
    try:
        limit = int(input("Limit (Number): ")) or 20
        entity = str(input("Entity to search (software,iPadSoftware): ")) or "software,iPadSoftware" 
        country = str(input("Country Code (US): ")).lower() or "us" # country code (us = america)
        term = str(input("Term: ")) or "terminator"
        targetGenre = str(input("Genre (\"Games\"): ")) or "games"
        
        if limit == 0: print("[!] Enter a value higher than 0"); main()

        # can add this back just do '&callback={callback}' in the url
        # callback = "fetch_with_cb_cb" # easy function parsing from result <3 apple

        output = str(input("Output file (result.txt): ")) or "results.txt"

        url = f"https://itunes.apple.com/search?limit={limit}&entity={entity}&country={country}&term={term}"

        res = requests.get(url)

        if PRINT_RESPONSE:
            print(json.dumps(res.json(), indent=4))

        if res.status_code != 200:
            ValueError(f"[!] Response code: {res.status_code}\nURL: {url}\nCorrect issues and try again.")
        
        if json.dumps(res.json().get('resultCount', int)) == '0':
            ValueError(f"[!] No results. Please correct any issues.\nLimit: {limit}\nEntity: {entity}\nCountry Code (default us): {country}\nSearch term: {term}")
        
        raw = res.json().get('results', []) # gets the results
        
        filtered = filter(raw)

        versorted = versortCheck(filtered) # i did this so i can shorten the code thats in the block.

        # we parse the return from versorted and then use that data
        gensorted = gensortCheck(versorted, targetGenre)
        
        # after we save it
        save(gensorted, output)

    except Exception as e:
        print(f"Uh oh you encountered an error!\n{e}")
        input("Press any key to continue")
        time.sleep(5)
        os.system('clear') # change to your distro/os clear equivilent. cls for win.
        main()

if __name__ == '__main__':
    if DEBUG: input("[!] WARNING YOU ARE USING DEBUG [!]\nPRESS ENTER TO CONTINUE\n")
    main()

Made this for fun. I know you can use the Decrypt IPA store for searching but this could be better due to the filters it gives. All outputs are in a Json string that is indented too for an easier read.

Updated by carpoa
if DEBUG == True -> if DEBUG

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • War Commander: Rogue Assault v9.3.0 +2 Jailed Cheats
      Modded/Hacked App: War Commander: Rogue Assault By KIXEYE Inc
      Bundle ID: com.kixeye.warcommanderrogueassault
      iTunes Store Link: https://apps.apple.com/us/app/war-commander-rogue-assault/id695948278?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Damage Multiplier
      - Never Die


      Jailbreak required hack(s): 


      iOS Hack Download IPA Link:

      Hidden Content

      Download via the iOSGods App








      PC Installation Instructions:
      STEP 1: If necessary, uninstall the app if you have it installed on your iDevice. Some hacked IPAs will install as a duplicate app. Make sure to back it up so you don't lose your progress.
      STEP 2: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see this tutorial topic.
      STEP 3: Download Sideloadly and install it on your PC.
      STEP 4: Open/Run Sideloadly on your computer, connect your iOS Device, and wait until your device name shows up.
      STEP 5: Once your iDevice appears, drag the modded .IPA file you downloaded and drop it inside the Sideloadly application.
      STEP 6: You will now have to enter your iTunes/Apple ID email login, press "Start" & then you will be asked to enter your password. Go ahead and enter the required information.
      STEP 7: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 8: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles/VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust email@iosgods.com'.
      STEP 9: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. Jailbroken iDevices can also use Sideloadly/Filza/IPA Installer to normally install the IPA with AppSync. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Haha
        • Thanks
        • Winner
        • Like
      • 45 replies
    • (Tower Of Saviors) 神魔之塔 v2025.211 +4 Jailed Cheats
      Modded/Hacked App: 神魔之塔 By Mad Head Limited
      Bundle ID: com.madhead.tos.zh
      iTunes Store Link: https://apps.apple.com/us/app/%E7%A5%9E%E9%AD%94%E4%B9%8B%E5%A1%94/id583798880?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier
      - Weak Enemies
      - Dumb Enemies


      Jailbreak required hack(s): 


      iOS Hack Download IPA Link:

      Hidden Content

      Download via the iOSGods App








      PC Installation Instructions:
      STEP 1: If necessary, uninstall the app if you have it installed on your iDevice. Some hacked IPAs will install as a duplicate app. Make sure to back it up so you don't lose your progress.
      STEP 2: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see this tutorial topic.
      STEP 3: Download Sideloadly and install it on your PC.
      STEP 4: Open/Run Sideloadly on your computer, connect your iOS Device, and wait until your device name shows up.
      STEP 5: Once your iDevice appears, drag the modded .IPA file you downloaded and drop it inside the Sideloadly application.
      STEP 6: You will now have to enter your iTunes/Apple ID email login, press "Start" & then you will be asked to enter your password. Go ahead and enter the required information.
      STEP 7: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 8: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles/VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust email@iosgods.com'.
      STEP 9: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. Jailbroken iDevices can also use Sideloadly/Filza/IPA Installer to normally install the IPA with AppSync. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Like
      • 88 replies
    • War Commander: Rogue Assault v9.3.0 +3 Cheats
      Modded/Hacked App: War Commander: Rogue Assault By KIXEYE Inc
      Bundle ID: com.kixeye.warcommanderrogueassault
      iTunes Store Link: https://apps.apple.com/us/app/war-commander-rogue-assault/id695948278?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - Never Die
      - Damage Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Not responsible for any bans



      Download Hack



      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above.
      STEP 2: Copy the file over to your iDevice using any of the file managers mentioned above or skip this step if you're downloading from your iDevice.
      STEP 3: Using Filza or iFile, browse to where you saved the downloaded .deb file and tap on it.
      STEP 4: Once you tap on the file, you will need to press on 'Install' or 'Installer' from the options on your screen.
      STEP 5: Let Filza / iFile finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 6: If the hack is a Mod Menu, which is usually the case nowadays, the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 7: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - @Zahir


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 356 replies
    • 神魔之塔 - Tower of Saviors v2025.211 +4 Cheats
      Modded/Hacked App: 神魔之塔 - Tower of Saviors By Mad Head Limited
      Bundle ID: com.madhead.tos.zh
      iTunes Store Link: https://apps.apple.com/us/app/神魔之塔-tower-of-saviors/id583798880

      Hack Features:
      - weak enemies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 402 replies
    • Toon Blast v17445 +3 Cheats
      Modded/Hacked App: Toon Blast By Peak Games
      Bundle ID: net.peakgames.toonblast
      iTunes Store Link: https://apps.apple.com/us/app/toon-blast/id1176027022?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - items/coins increase
      - always red blocks
      - unlimited lives



      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above.
      STEP 2: Copy the file over to your iDevice using any of the file managers mentioned above or skip this step if you're downloading from your iDevice.
      STEP 3: Using Filza or iFile, browse to where you saved the downloaded .deb file and tap on it.
      STEP 4: Once you tap on the file, you will need to press on 'Install' or 'Installer' from the options on your screen.
      STEP 5: Let Filza / iFile finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 6: If the hack is a Mod Menu, which is usually the case nowadays, the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 7: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 465 replies
    • Toon Blast v17445 +3 Jailed Cheats
      Modded/Hacked App: Toon Blast By Peak Games
      Bundle ID: net.peakgames.toonblast
      iTunes Store Link: https://itunes.apple.com/us/app/toon-blast/id1176027022?mt=8&uo=4&at=1010lce4


      Mod Requirements:
      - Jailbroken or Non-Jailbroken iPhone/iPad/iPod Touch.
      - Cydia Impactor.
      - A Computer Running Windows/Mac/Linux.

      This hack only works on x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, SE, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.
      Hack Features:
      - Int Coins (get)

      - Boosts (get)


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      Hack Download Link:

      Hidden Content
      https://app.iosgods.com/store/appdetails/656-toon-blast-hack







      Installation Instructions:
      STEP 1: If necessary, uninstall the app if you have it installed on your iDevice. Some hacked IPAs will install as a duplicate app. Make sure to back it up so you don't lose your progress.
      STEP 2: Download the pre-hacked .IPA file from the link above to your computer.
      STEP 3: Download Cydia Impactor and extract the archive.
      STEP 4: Open/Run Cydia Impactor on your computer then connect your iOS Device and wait until your device name shows up on Cydia Impactor.
      STEP 5: Once your iDevice appears, drag the modded .IPA file you downloaded and drop it inside the Cydia Impactor application.
      STEP 6: You will now be asked to enter your iTunes/Apple ID email login & then your password. Go ahead and enter the required information..
      STEP 7: Wait for Cydia Impactor to finish sideloading/installing the hacked IPA.
      STEP 8: Once the installation is complete and you see the app on your Home Screen, you will now need to go to your Settings -> General -> Profiles & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust email@iosgods.com'.
      STEP 9: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further instructions inside the hack's popup in-game.
      NOTE: For free Apple Developer accounts you will need to repeat this process every 7 days. Using a disposable Apple ID for this process is suggested but not required. Jailbroken iDevices can skip using Cydia Impactor and just install the IPA mod with AppSync & IPA Installer (or alternatives) from Cydia. If you have any questions or problems, read our Cydia Impactor topic and if you don't find a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - @K_K

      - @Laxus
      Cheat Video/Screenshots:

      N/A

       
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,014 replies
    • Kingdom Survivors v1.0680 [+4 Cheats]
      Modded/Hacked App: Kingdom Survivors By a plant standing on a chair Game Studio HB
      Bundle ID: com.DefaultCompany.MonsJacobSurvivorGame
      iTunes Store Link: https://apps.apple.com/us/app/kingdom-survivors/id1662497248?uo=4



      🚀 Hack Features

      - Never Die
      - Gain Exp (Toggle On gives you exp in battle)
      - Unlock All Characters
      - Add Currency
        • Like
      • 12 replies
    • Kingdom Survivors v1.0680 [+4 Jailed Cheats]
      Modded/Hacked App: Kingdom Survivors By a plant standing on a chair Game Studio HB
      Bundle ID: com.DefaultCompany.MonsJacobSurvivorGame
      iTunes Store Link: https://apps.apple.com/us/app/kingdom-survivors/id1662497248?uo=4



      Hack Features:

      - Never Die
      - Gain Exp (Toggle On gives you exp in battle)
      - Unlock All Characters
      - Add Currency

        • Informative
        • Agree
        • Thanks
        • Like
      • 9 replies
    • Pal Go: Tower Defense TD v0.3.64 [+7 Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      🚀 Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 39 replies
    • Pal Go: Tower Defense TD v0.3.64 [+7 Jailed Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       

      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 64 replies
    • NETHER MONSTERS v1.03 [+4 Cheats]
      Modded/Hacked App: NETHER MONSTERS By ARAKUMA STUDIO S.A.
      Bundle ID: com.ArakumaStudio.NetherMonsters
      iTunes Store Link: https://apps.apple.com/us/app/nether-monsters/id6742568029?uo=4

       

      🤩 Hack Features

      - Never Die
      - Get IAP Products  
      - Add Currency
      - Auto Win (Enable inside battle)
        • Winner
        • Like
      • 4 replies
    • NETHER MONSTERS v1.03 [+4 Jailed Cheats]
      Modded/Hacked App: NETHER MONSTERS By ARAKUMA STUDIO S.A.
      Bundle ID: com.ArakumaStudio.NetherMonsters
      iTunes Store Link: https://apps.apple.com/us/app/nether-monsters/id6742568029?uo=4



      🤩 Hack Features

      - Never Die
      - Get IAP Products  
      - Add Currency
      - Auto Win (Enable inside battle)
        • Thanks
        • Like
      • 3 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines