Extract Data from My Apps Page to Quickly Build App Launcher for All Apps!

GreenFlux
Participant V

App Launchers can be very useful to organize your apps:

But when you have a LOT of apps, it can take a while to collect all the names, URLs, and images.

You can copy data from the My Account/App Info page, but it doesnโ€™t quite have everything in a useable format.

I was making a launcher for a client with a LOT of apps, and needed a better way to pull this info. So I developed a few techniques to get the data, and came up with some pretty cool tricks I wanted to share.

I set up a separate account with test data just to demo it.

Hereโ€™s how to extract the images and app Idโ€™s quickly and easily:


Formula from video for reference:

=INDEX(IMPORTXML("https://www.appsheet.com/start/"&E2,"//img/@src"),2)
9 1 546
1 REPLY 1

The above method only works for apps owned by the account in question. Shared apps donโ€™t show up in the same screen to be easily copy-able.

I just wrote this python code to scrape the HTML page at My Apps - AppSheet
and output a semicolon-separated file with:

appname ; appid ; displayname ; logo-URL

  1. Navigate to the above app page
  2. Right Click
  3. View Source
  4. Download the HTML file as โ€œmy-apps.htmlโ€
  5. Run the python code from the same directory
  6. Output is file โ€œapps.csvโ€
  7. Load that into gsheet, separate into columns by semicolon

Not incredibly user-friendly, but Iโ€™m tired of working on it for now

Hereโ€™s the python code:

import sys
from lxml import html

#enter input html filename here
FILENAME_IN = 'my-apps.html'

#enter output filename here
#  I used '.csv' extension, even those I'm de-limiting by semi-colon. proper? who knows...
FILENAME_OUT = 'apps.csv' 

#sections of apps to include. mainly to exclude "quickstart"
sections = ["prototype-apps" , "shared-apps" , "deployed-apps"]

f = open(FILENAME_IN , 'r')
ff = f.read()
tree = html.fromstring(ff)

with open(FILENAME_OUT , 'w') as f:
    ogout = sys.stdout
    sys.stdout = f
    for s in sections:
        section = tree.xpath('//section[@id="'+s+'"]')[0]
        cardList = section.xpath('.//div[@class="app-card-list"]')[0]
        for a in cardList.xpath('.//div[contains(@class, "app-card")]'):
            appName = a.get("class").replace("app-card " , "")
            displayName = a.xpath('.//button[@class="CloneButton"]')[0].get("data-shortname")
            appID = a.get("id").replace("appcard-","")
            
            line = appName + ";" + appID + ";" + displayName
            
            img = a.xpath('.//img')
            if img:
                line = line + ";" + img[0].get("src")
  
            print(line)
    sys.stdout = ogout
Top Labels in this Space