Open the Mac App Store in your browser
I was up late last night building a Mac App Store scraper. In the process I discovered how to browse the store in Safari. Without further ado, let me share the geek.
It turns out you can spoof curl with the Mac App Store user agent to access its data. You'll need to use Terminal for this trick, so if you're uncomfortable with the command line, it's sort of time to skip to the next post.
Still here? Good, let's go.
First, grab and open New & Noteworthy page with the following commands:
curl -silent -A "iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.6.7; en) AppleWebKit/533.20.25" 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewGrouping?id=29526&mt=12' > ~/Desktop/foo.html; open ~/Desktop/foo.html
Conversely, just open the front page:
curl -silent -A "iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.6.7; en) AppleWebKit/533.20.25" 'http://itunes.apple.com/us/genre/mac/id39?mt=12' > ~/Desktop/foo.html; open ~/Desktop/foo.html
The front page doesn't always want to open properly, but if you load another primary page like New & Noteworthy first, it usually loads the way you're looking for.
Some will want to ignore the HTTP status that appears at the top of the webpage -- but they'll probably be using the App itself, so it shouldn't be a problem for everyone else. Have fun!
I was up late last night building a Mac App Store scraper. In the process I discovered how to browse the store in Safari. Without...
Subscribe to Newsletter
Software Updatesmore updates
- 1Password 4.5 for iOS gains features, slims down
- IFTTT for iPad brings service/device mashups to your favorite tablet
- Daily App: Rormix brings indie music videos to your iPhone and iPad
- Pebble updates its iOS app with new apps, sharing options and v2.1 fix
- PSA: Pebble for iOS v.2.1 update contains critical flaw that breaks the app - Update
- Today in the App Store -- the best free apps, new apps and app updates