Google Play のランキングとかレビューとかを取得する #
Google Play (旧 Android Market) のサイトから、ランキングとかレビューとかをスクレイピングする Perl ライブラリ「WWW::GooglePlay::Scraper」
AppStore::Scraper
の Google Play 版です
仕事で投入した後、問題なく動いてるようなので、公開します
GitHub からどうぞ
p5-www-googleplay-scraper
use WWW::GooglePlay::Scraper;
use Data::Dumper;
my $obj = WWW::GooglePlay::Scraper->new(wait => 5);
my $info = $obj->app_info(
app => ['jp.co.fenrir.android.sleipnir'],
store => ['ja','en'],
);
print Dumper $info;
とやると、こんな結果が返ってきます
$VAR1 = {
'jp.co.fenrir.android.sleipnir' => {
'en' => {
'store_name_jp' => "\\x{82f1}\\x{8a9e}",
'total_rank' => undef,
'new_rank' => undef,
'reviews' => [
{
'date' => ' on March 27, 2012',
'title' => '...',
'message' => ' ..... '
},
{
'date' => ' on February 21, 2012',
'title' => '***',
'message' => ' .....'
}
],
'genre_id' => 'COMMUNICATION',
'app_name' => 'Sleipnir Mobile - Web Browser',
'genre_rank' => 25,
'store_name' => 'English',
'store_info' => {
'name_jp' => "\\x{82f1}\\x{8a9e}",
'name' => 'English'
},
'artist_id' => 'Fenrir Inc.',
'ratings' => {
'detail' => [
'742',
'566',
'282',
'107',
'101'
],
'summary' => {
'average' => '4.0',
'votes' => '1798'
}
},
'price' => '0',
'genre_name' => 'Communication'
},
'ja' => {
'store_name_jp' => "\\x{65e5}\\x{672c}\\x{8a9e}",
'total_rank' => undef,
'reviews' => [
{
'date' => '2012/03/27',
'title' => '...',
'message' => " ..... "
},
{
'date' => '2012/03/27',
'title' => "...",
'message' => " ..... "
}
],
'genre_id' => 'COMMUNICATION',
'app_name' => "Sleipnir Mobile - \\x{30a6}\\x{30a7}\\x{30d6}\\x{30d6}\\x{30e9}\\x{30a6}\\x{30b6}",
'genre_rank' => 25,
'store_name' => "\\x{65e5}\\x{672c}",
'store_info' => {
'name_jp' => "\\x{65e5}\\x{672c}\\x{8a9e}",
'name' => "\\x{65e5}\\x{672c}"
},
'artist_id' => 'Fenrir Inc.',
'ratings' => {
'detail' => [
'742',
'566',
'282',
'107',
'101'
],
'summary' => {
'average' => '4.0',
'votes' => '1798'
}
},
'price' => '0',
'genre_name' => "\\x{901a}\\x{4fe1}"
}
}
};