With the release of Bailout America we wanted to find a way to display the game’s App Store rating on the website without editing it manually, so we decided to scrape the information from iTunes automatically. I figured if I could pull the number of stars as a numeral I could iterate and build out the star images.
What I’ve ended up with is much more and I thought someone else might benefit from it. Over the next several days I will post details about how I ended up with our current version as well as some idea how you can put it to use for your own benefit. Today we will start with the basics - how to scrape the iTunes store.
The first step is to decide what data we need and on what page we can find it. We launch iTunes and browse to our application. We find the link that reads 4 Reviews for all versions and click it which takes us to a page that shows the number of stars near the top right hand side of the page. If I can grab that, we’ll be in business. So, we click the back button, find that link again, control-click on it and copy the iTunes URL.