Skip to content

Instantly share code, notes, and snippets.

@prot0man
Last active March 3, 2022 03:10
Show Gist options
  • Save prot0man/702bef7a1926af19a047509b88497c8f to your computer and use it in GitHub Desktop.
Save prot0man/702bef7a1926af19a047509b88497c8f to your computer and use it in GitHub Desktop.
Get Play Store Application Version
import requests
import urllib
import re
import argparse
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("getversion")
PLAY_URL_FMT_STR = "https://play.google.com/store/apps/details?id=%s&hl=%s&gl=%s"
VERSION_RE = re.compile("Current Version.*?>([a-zA-Z0-9\.\- ]+)<", re.M)
def parse_app_version(content):
result = VERSION_RE.search(content)
if result:
return result.groups(1)
def get_app_version(app_name):
hl = "en_US"
gl = "US"
url = PLAY_URL_FMT_STR % (app_name, hl, gl)
response = requests.get(url)
data = response.content.decode("utf8")
result = parse_app_version(data)
if result is None or len(result[0]) < 2:
index = data.find("Current Version")
if index != -1:
# if we did find a fragment of the regular expression, emit a log message that shows
# where the RE may have failed.
logger.warning("Failed to get version data:\'%s'" % (data[index:index + 256]))
return result
def parse_args():
ap = argparse.ArgumentParser()
ap.add_argument("app_name")
args = ap.parse_args()
return args
def main():
args = parse_args()
version = get_app_version(args.app_name)
logger.info("Got version: %s" % version)
if __name__ == "__main__":
main()
@prot0man
Copy link
Author

prot0man commented Mar 3, 2022

PackageName
com.google.android.contacts
com.google.android.dialer
com.google.android.talk
com.google.android.gms
com.google.android.googlequicksearchbox
com.google.android.apps.walletnfcrel
com.google.android.apps.books
com.google.android.calendar
com.android.chrome
com.google.android.apps.cloudprint
com.google.android.deskclock
com.google.android.apps.enterprise.dmagent
com.google.android.apps.work.clouddpc
com.google.android.apps.docs
com.google.android.apps.docs.editors.docs
com.google.android.apps.docs.editors.sheets
com.google.android.apps.docs.editors.slides
com.google.android.apps.fitness
com.google.android.GoogleCamera
com.google.earth
com.google.android.apps.inputmethod.hindi
com.google.android.launcher
com.google.android.tts
com.google.android.inputmethod.latin
com.google.android.apps.maps
com.google.android.apps.youtube.music
com.google.android.apps.magazines
com.google.android.apps.genie.geniewidget
com.google.android.apps.photos
com.google.android.play.games
com.google.android.apps.plus
com.google.android.gm
com.google.android.keep
com.google.android.street
com.google.android.marvin.talkback
com.google.android.videos
com.google.android.webview
com.google.android.youtube
com.google.ar.core
com.google.android.apps.youtube.music
com.google.android.apps.translate
com.google.android.projection.gearhead
com.google.android.apps.chromecast.app
com.google.android.apps.tachyon
com.google.android.apps.vega
com.google.android.apps.wellbeing
com.google.android.apps.kids.familylink
com.google.ar.lens
com.google.android.apps.youtube.kids
com.google.android.apps.adm
com.google.android.apps.googleassistant
com.google.android.apps.authenticator2
com.niksoftware.snapseed
com.google.android.apps.paidtasks
com.google.android.apps.messaging
com.google.android.ims
com.google.android.apps.mapslite
com.google.android.apps.navlite
com.google.android.apps.searchlite
com.google.android.wearable.app
com.google.vr.vrcore
com.google.android.calculator
com.google.android.apps.podcasts
com.google.android.apps.kids.familylinkhelper
com.google.android.apps.youtube.creator
com.google.android.apps.nbu.files
com.google.android.apps.photos.scanner
com.google.samples.apps.cardboarddemo
com.google.android.apps.photosgo
com.google.android.apps.subscriptions.red
com.google.android.apps.tasks
com.google.android.apps.wallpaper
com.google.chromeremotedesktop
com.google.android.apps.meetings
com.google.android.tvrecommendations
com.google.android.tvlauncher
com.google.android.apps.adwords
com.google.android.accessibility.soundamplifier
com.google.android.apps.giant
com.google.android.apps.cultural
com.google.android.apps.classroom
com.google.android.webview.beta
com.google.android.apps.jam
com.google.android.webview.dev
com.chrome.beta
com.google.android.webview.canary
com.google.socratic
com.google.android.apps.accessibility.voiceaccess
com.google.android.apps.dynamite
com.google.android.katniss
com.google.android.tv
com.google.android.apps.helprtc
com.google.android.apps.mediashell
com.area120.grasshopper
com.google.toontastic
com.google.android.youtube.tv
com.chrome.canary
com.google.android.apps.enterprise.cpanel
com.google.android.apps.cloudconsole
com.google.android.apps.village.boond
com.google.android.apps.blogger
com.google.android.apps.seekh
com.google.enterprise.topaz.mobile.android
com.google.android.apps.pixelmigrate
com.google.android.apps.accessibility.maui.actionblocks
com.google.vr.cardboard.apps.designlab
com.google.ar.unity.ddelements
com.google.android.leanbacklauncher
com.google.android.apps.actionsservice
com.google.android.vr.home
com.google.android.vr.inputmethod
com.google.android.apps.accessibility.auditor
com.google.android.apps.recorder
com.google.android.apps.camera.poseidon
com.google.android.apps.youtube.music.pwa
com.google.android.apps.automotive.inputmethod
com.google.android.apps.wearables.maestro.companion
com.google.android.apps.safetyhub
com.google.android.apps.cameos
com.google.android.apps.accessibility.reveal
com.google.android.apps.security.securityhub
androidx.compose.material.catalog
com.google.android.apps.restore
com.epix.epix.now
com.hbo.hbonow
com.paypal.android.p2pmobile
com.topgamesinc.evony
com.ovelin.guitartuna
cz.hipercalc.pro
com.noctuasoftware.stellarium_free
com.disney.disneyplus
com.atlassian.android.jira.core
com.wixot.coinroll
com.whatsapp
com.zillow.android.zillowmap
com.tocaboca.tocaneighborhood
com.tocaboca.tocalifeworld
com.cisco.webex.meetings
com.zhiliaoapp.musically
com.marmalade.monopoly
com.king.candycrushsaga
air.com.vudu.air.DownloaderTablet
com.duckduckgo.mobile.android
easy.sudoku.puzzle.solver.free
com.nianticlabs.pokemongo
com.amazon.dee.app
com.udemy.android.ufb
org.kurzgesagt.app.Universe
com.brave.browser
udk.android.reader
org.twisevictory.apps
com.moonactive.coinmaster
com.squareup.cash
com.ebay.mobile
com.microsoft.sharepoint
com.discord
de.twokit.screen.mirroring.app.roku.pro
com.outfit7.talkingben
tv.twitch.android.app
com.gotv.crackle.handset
com.cbs.app
notion.id
com.facebook.mlite
tv.pluto.android
com.peacocktv.peacockandroid
com.bytetyper.gemstack
com.mojang.minecraftpe
com.hg.bcnw
com.mxtech.videoplayer.ad
com.tinder
com.robtopx.geometryjump
com.area120.paperwork
com.fusee.MergeMaster
org.coursera.android
com.freeplay.twerk
org.peakfinder.area.alps
com.roku.remote
freeplay.crowdrun.com
com.evernote
com.microsoft.office.powerpoint
com.clickteam.ultimatecustomnight
com.udemy.android
cs14.pixelperfect.iconpack.novadark
com.roblox.client
com.innersloth.spacemafia
com.instagram.android
com.Slack
tunein.player
com.doubleTwist.androidPlayerPro
com.discovery.discoveryplus.mobile
com.pandora.android
com.snapchat.android
com.crunchyroll.crunchyroid
com.playrix.homescapes
com.scottgames.fivenightsatfreddys
com.king.candycrushsodasaga
videoeditor.videorecorder.screenrecorder
com.ninjakiwi.bloonstd6
us.zoom.videomeetings
com.truecaller
com.tdr3.hs.android
com.acmeaom.android.myradarpro
com.philo.philo.google
com.pinterest
com.trello
org.videolan.vlc
com.gamepass
com.chucklefish.stardewvalley
com.clickteam.freddyfazbearspizzeriasimulator
com.arkhe.batteryrun
com.dailyword.challenge.addictive
com.scottgames.fnaf2
com.sec.android.app.voicenote
com.playrix.fishdomdd.gplay
com.teslacoilsw.launcher.prime
com.iqiyi.i18n.tv
com.viki.android
com.Funimation.FunimationNow
com.amazon.storm.lightning.client.aosp
com.n3twork.tetris
com.overdrive.mobile.android.libby
com.disney.datg.videoplatforms.android.abcf
com.sunsetgames.bordersecurity
com.bydeluxe.d3.android.program.starz
com.amazon.avod.thirdpartyclient
com.whatsapp.w4b
aplicacionpago.tiempo
com.tocaboca.tocahospital
com.microsoft.bing
net.esword.esword
de.twokit.video.tv.cast.browser.roku.pro
com.microsoft.teams
com.nytimes.android
org.prowl.torque
com.microsoft.todos
com.microsoft.xboxone.smartglass
com.dts.freefireth
com.intuit.turbotax.mobile
com.microsoft.office.onenote
com.scannerradio_pro
com.nintendo.zaka
com.google.android.apps.subscriptions.red
com.vitotechnology.StarWalk2
com.microsoft.office.word
com.prism.live
com.hulu.plus
com.microsoft.office.excel
net.relaxio.babysleep
com.Nokobot.FrozenHoneyASMR
com.plarium.raidlegends
com.gk.themeparkfun3d
com.intsig.camscanner
com.tubitv
air.com.buffalo_studios.newflashbingo

@prot0man
Copy link
Author

prot0man commented Mar 3, 2022

Tested against this list of appids. Note that google uses "Varies by version" as a version for some of these, so our RE matches horrendous things like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment