google_play_scraperというライブラリを用いてGooglePlayストアのレビューをスクレイピングします。
google_play_scraperをインストールしてインポート
!pip install google-play-scraper from google_play_scraper import Sort, reviews
アンダーバーとハイフンがややこしい…
GooglePlayストアのデータを抽出
今回は在宅ワークで大活躍のZoomのレビューを取得したいと思う。(自分はZoomではなくMeetを愛用していますが…)
result, _ = reviews( 'us.zoom.videomeetings', lang='ja', country='jp', )
最初の引数で取得したいアプリのappIdを入れます。またlangやcountryで取得したい国を指定してあげてください。
id=の後ろのパラメータがappIdです。
レビューを抽出
レビューはcontentの中に入っているので抜き出します。
comment_list = [comment.get("content") for comment in result] comment_list
あとは形態素解析やら何やらやって遊ぼう。