当前位置:首页 > 未分类 > 正文内容

Screen Scraping the Google Play Store with Google Sheets

ceacer3周前 (05-02)未分类6109

I was trying to fetch the average ratings and the download count of the top Android Apps from the Google Play Store but since they offer no API, screen scraping was the only solution.

As a first step, I wrote a Google search query that returns all Android apps that have been downloaded 500+ million times from the Play Store. The query looked something like this:

site:play.google.com "500,000,000 - 1,000,000,000"

The parameter num=100 was appended to the Google Search URL so that it returns 100 search results on the first page. I then created a new sheet in Google Docs and used the ImportXML function to extract all the Google Play hyperlinks into the Google Sheet (A1 is the Google URL).

=importXML(A1, "//h3/a/@href")

Once the Google Play URL of an App is known, the rating and count can be easily know using another importXML function (K3 is the Google Play url for any Android App).

=importXML(K3,"//meta[@itemprop='ratingValue']/@content")
=importXML(K3,"//meta[@itemprop='ratingCount']/@content")

Please note that a Google Sheet can have a maximum of 50 ImportXML functions.

相关文章

How to Create Multiple Sub

How to Create Multiple Sub

A teacher would like to create separate Google Drive folders for each student in her class. Within e...

Formulas in Google Sheets Disappear When New Rows Are Added

Formulas in Google Sheets Disappear When New Rows Are Added

An order form, created in Google Forms, requires customers to provide their full name, the item quan...

How Teachers can Email Parents of Students from Google Forms

How Teachers can Email Parents of Students from Google Forms

A school provides email accounts for students that are enrolled in high school. The school has publ...

Color Codes for Google Spreadsheets

This Google Script converts the currently active Google Spreadsheet into a square grid of randomly c...

How to Create Dynamic Open Graph Images with Google Sheets

How to Create Dynamic Open Graph Images with Google Sheets

An open graph image (OG image) is the image that is displayed when any of your website links are sha...

How to Request Stripe Payments with Google Sheets

How to Request Stripe Payments with Google Sheets

Stripe now offers a Payment Links API to help you programmatically generate payment links in bulk fo...