Version einer App aus Itunes Store lesen
-
Dieser Thread wurde von Moderator/in nman aus dem Forum Themen rund um die IT in das Forum Rund um die Programmierung verschoben.
Im Zweifelsfall bitte auch folgende Hinweise beachten:
C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?Dieses Posting wurde automatisch erzeugt.
-
Die Id wird sich also fuer die App nie aendern oder. Aber der Link zu der App koennte sich ja theoretisch mal aendern . Da faellt mir gerade was ein. Die ID ist fuer alle Laender gleich obwohl die Apps ja unterschiedlich sein koennen . Es koennte also sein dass für Deutschland eine neue Version rauskommt aber fuer China nicht. Hmm....
-
http://itunes.apple.com/lookup?id=868692227&country=de
http://itunes.apple.com/lookup?id=868692227&country=cn
-
danke schon mal . hast mir echt geholfen. Cool wäre natürlich wenn er jetzt nur die Version ausgeben würde und nicht den ganzen anderen Mist
Aber da muss ich jetzt mal schauen wie das geht. Sonst muss ich die Version irgendwie parsen
-
Das ist JSON, steht in der Doku. Dafür gibt es in jeder Sprache tausend Parser.
~ % curl -s 'http://itunes.apple.com/lookup?id=868692227&country=de' | jq -r .results[0].version 1.0.2
-
Ok. Dann hab ich ja fast alles. Ein Problem hab ich allerdings noch.
Ich offne jetzt von meinem Python Script die URL . Die geht dann im Safari Browser auf. Ich frag mich jetzt noch wie ich das dann automatisch in einer Datei speichern kann.
-
-
Der Code hier macht alles
f = urllib.urlopen(url) myfile = f.read() print my file
Ich frage mich gerade wie man das Implementieren könnte. Wahrscheinlich bietet der Safari Browser ( ich denke mal der wird verwendet ) entsprechende Schnittstellen an um den Code auszulesen.
-
So jetzt hab ich fast alles, aber ich frag ich mich gerade wie ich aus dem riesigen Datensalat was ja ein Json Format darstellt am besten die Version der App rausfinde. Ich denke das wird jetzt ziemlich schwer. Ich werde wohl einige Schleifen brauchen.
1.Moeglichkeit: Umwandeln der Json Struktur in Python Objekte
2.Moeglichkeit: Den String nach "version" absuchenAlso das bekam ich als String zurückgeliefert.
{
"resultCount":1,
"results": [
{"kind":"software", "features":["iosUniversal"],
"supportedDevices":["iPadMini4G", "iPhone5c", "iPadMini", "iPhone-3GS", "iPadThirdGen4G", "iPodTouchFifthGen", "iPad2Wifi", "iPadFourthGen4G", "iPad23G", "iPhone5s", "iPhone4S", "iPadThirdGen", "iPhone5", "iPodTouchourthGen", "iPadFourthGen", "iPhone4"], "isGameCenterEnabled":false, "artistViewUrl":"https://itunes.apple.com/us/artist/audible-inc./id379693834?uo=4", "artworkUrl60":"http://a812.phobos.apple.com/us/r30/Purple4/v4/86/46/a3/8646a3c6-4e1f-5583-5afc-30ce8e26d855/AppIcon57x57.png",
"screenshotUrls":["http://a4.mzstatic.com/us/r30/Purple4/v4/c5/44/9b/c5449b58-ca39-a7f1-6ee7-e28ad7285a77/screen322x572.jpeg", "http://a1.mzstatic.com/us/r30/Purple1/v4/12/81/07/1281075f-63a9-abf0-1dc7-35b60ea02e71/screen322x572.jpeg", "http://a3.mzstatic.com/us/r30/Purple1/v4/e5/c2/95/e5c295b4-d81b-9619-91d6-7c14ae681b33/screen322x572.jpeg", "http://a2.mzstatic.com/us/r30/Purple1/v4/60/62/20/606220a3-b2b3-cdbf-5f41-cb18e39fa1bc/screen322x572.jpeg", "http://a3.mzstatic.com/us/r30/Purple4/v4/87/7a/25/877a25ff-8c89-ee2d-c357-88a2a624f255/screen322x572.jpeg"],
"ipadScreenshotUrls":["http://a4.mzstatic.com/us/r30/Purple4/v4/26/44/40/26444087-845d-6bd5-70a6-168a85b178f6/screen480x480.jpeg", "http://a1.mzstatic.com/us/r30/Purple3/v4/cf/63/30/cf63300a-ca4e-b5a4-e714-e8c61da4e244/screen480x480.jpeg", "http://a5.mzstatic.com/us/r30/Purple3/v4/c0/bb/d9/c0bbd987-9369-3fad-a508-3f6ec276af51/screen480x480.jpeg", "http://a5.mzstatic.com/us/r30/Purple4/v4/6e/79/3a/6e793a72-81b7-8974-386c-3af74c414a66/screen480x480.jpeg", "http://a5.mzstatic.com/us/r30/Purple3/v4/90/49/e7/9049e7cd-de9f-3816-0278-bf465e52d911/screen480x480.jpeg"], "artworkUrl512":"http://a1417.phobos.apple.com/us/r30/Purple4/v4/77/7b/0e/777b0e02-cb35-7676-298c-1a3a4ad58626/mzl.ledvbizn.png", "artistId":379693834, "artistName":"Audible, Inc.", "price":0.00, "version":"2.2.1",
"description":"Not enough time for all the books you want to enjoy? Download the app by Audible, an Amazon company, to listen to books on the go.\n\nImmerse yourself in a great story anytime, anywhere, by downloading from a breathtaking range of 150,000+ titles to your iPhone, iPod Touch, or iPad—from best sellers to classics, and everything in-between.\n\nNow you can turn on a good book even when you can’t pick one up—on your way to work, at the gym, while folding laundry, or any other time your eyes and hands are busy.\n\nFeatures:\n• Transfer books to your device over wi-fi\n• Chapter navigation, bookmarking, sleep mode, variable narration speed, button-free mode \n• Multitasking for background downloading and listening\n• Earn badges and keep track of your listening habits \n• NEW! Switch between reading and listening with Whispersync for Voice (compatible Kindle app or device required) \n• Connect to Facebook and Twitter to let your friends know what you’re listening to\n• Get insider information about author events and more with the Audible Newsfeed\n\nSupports Audible.com, Audible.co.uk, Audible.de, Audible.fr, and Audible.com.au\n\nListening with Audible is always time well spent. Download the free app now and discover a smarter way to use your smartphone.\n\nLet us help you at www.audible.com/help or get in touch on Twitter @audible_com", "currency":"USD", "genres":["Books", "Entertainment"], "genreIds":["6018", "6016"], "releaseDate":"2010-07-10T19:50:29Z", "sellerName":"Audible, Inc.", "bundleId":"com.audible.iphone", "trackId":379693831, "trackName":"Audiobooks from Audible", "primaryGenreName":"Book", "primaryGenreId":6018,
"releaseNotes":"* Includes a fix for customers who experienced app crashes in version 2.2 - Thank you for your patience!\n* A new “Today” widget! (iOS 8 only) Easily track your listening time using your device’s pulldown menu. Swipe down from the device's header and tap “Edit” to add the Audible widget to the main screen.\n* Bug fixes and app improvements.\n* Coming soon: An option to switch your player to a darker theme. We hear you and are working on it!", "minimumOsVersion":"6.0", "formattedPrice":"Free", "wrapperType":"software", "trackCensoredName":"Audiobooks from Audible", "trackViewUrl":"https://itunes.apple.com/us/app/audiobooks-from-audible/id379693831?mt=8&uo=4", "contentAdvisoryRating":"4+", "artworkUrl100":"http://a1417.phobos.apple.com/us/r30/Purple4/v4/77/7b/0e/777b0e02-cb35-7676-298c-1a3a4ad58626/mzl.ledvbizn.png", "languageCodesISO2A":["EN", "FR", "DE"], "fileSizeBytes":"44556563", "sellerUrl":"http://www.audible.com/", "averageUserRatingForCurrentVersion":4.0, "userRatingCountForCurrentVersion":1494, "trackContentRating":"4+", "averageUserRating":4.0, "userRatingCount":59804}]
}
-