Reporter.GooglePlay

Source

Summary

params_with_page(droid_package, page_num, locale \\ "en")
review_bodies(parsed_html)

Return list of review body

review_body_list(parsed_html)

Return list of review body which exclude blank titles

review_infos(parsed_html)

Return list of review infos

review_title_list(parsed_html)

Return list of review titles which exclude blank titles

review_titles(parsed_html)

Return list of review titles

review_url(droid_package, locale \\ "en")

Return POST message

review_url_with_page(droid_package, page_num, locale \\ "en")

Return POST message with paging

reviews(parsed_html)

Return list of class ‘single-review’

Functions

params_with_page(droid_package, page_num, locale \\ "en")
Source
review_bodies(parsed_html)

Return list of review body.

Example

iex> File.read!(“./test/data/google_post.html”) |> Floki.parse |> Enum.drop(1) |> Reporter.GooglePlay.review_bodies |> Enum.at(1) {“div”, [{"class", "review-body"}], [{“span”, [{"class", "review-title"}], ["Android5版"]}, “ なぜか「すべてのタブを閉じる」がありません。それ以外は満足です。 “, {“div”, [{"class", "review-link"}, {"style", "display:none"}], [{“a”,

[{"class", "id-no-nav play-button tiny"}, {"href", "#"},
 {"target", "_blank"}], ["全文を表示"]}]}]}
Source
review_body_list(parsed_html)

Return list of review body which exclude blank titles.

Example

iex> File.read!(“./test/data/google_post.html”) |> Floki.parse |> Enum.drop(1) |> Reporter.GooglePlay.review_body_list |> Enum.at(0) “ 戻るがきかない、軽いのがうりなのにどんどん重くなるなど微妙につかえないブラウザになってます…数ヶ月まったく治らないのでいい加減見限ろうかと。 “

Source
review_infos(parsed_html)

Return list of review infos.

Example

iex> File.read!(“./test/data/google_post.html”) |> Floki.parse |> Enum.drop(1) |> Reporter.GooglePlay.review_infos |> Enum.at(3) {“div”, [{"class", "review-info"}], [{"span", [{"class", "author-name"}], [{"a", [{"href", "/store/people/details?id=117395283570537705728"}], ["Kiriya Nachi"]}]}, {“span”, [{"class", "review-date"}], ["2015年6月20日"]}, {“a”, [{"class", "reviews-permalink"}, {"href", "/store/apps/details?id=com.android.chromeu0026amp;reviewId=Z3A6QU9xcFRPSDFpVURHVWo1Q091QnlUS1RHcjdhWXZpWmJzczJ5eHc0c3BBZ2RHc1dtT3dIMFVZR1VuRjZlRTFnQWVfVjhCeU5qd191OUV1cmxETDg2bEtF"}, {"title", "このレビューへのリンクです"}], []}, {“div”, [{"class", "review-source"}, {"style", "display:none"}], []}, {“div”, [{"class", "review-info-star-rating"}], [{“div”, [{“class”, “tiny-star star-rating-non-editable-container”},

{"aria-label",
 "5つ星のうち2つ星で評価しました"}],

[{“div”,

[{"class", "current-rating"}, {"style", "width: 40%;"}],
 []}]}]}]}
Source
review_title_list(parsed_html)

Return list of review titles which exclude blank titles.

Example

iex> File.read!(“./test/data/google_post.html”) |> Floki.parse |> Enum.drop(1) |> Reporter.GooglePlay.review_title_list ["不具合多すぎ", "Android5版", "開いていたタブが消える", "文字が見辛い", "サファリで開設しようとしても何もログインできない", "ブックマーク劣化…", "唯一使えるブラウザ", "ソースコード", "アプリ検索してもGoogle playに飛ばされない", "フリーズし過ぎ", "動き", "おかしい…", "タブ", "サクサク動く。", "なんというか…", "使えない", "ホーム", "?", "ゴミ", "開いたタブか・・・", "急に強制終了", "コピーできない", "タブの", "画像が表示されない", "いつまで経っても", "問題が発生したため終了します", "不具合?", "おい、おい、"]

Source
review_titles(parsed_html)

Return list of review titles.

Example

iex> File.read!(“./test/data/google_post.html”) |> Floki.parse |> Enum.drop(1) |> Reporter.GooglePlay.review_titles |> Enum.at(0) {“span”, [{"class", "review-title"}], ["不具合多すぎ"]}

Source
review_url(droid_package, locale \\ "en")

Specs:

Return POST message.

Examples

iex> Reporter.GooglePlay.review_url(“com.android.chrome”) “https://play.google.com/store/getreviews?id=com.android.chrome&reviewSortOrder=0&reviewType=1&pageNum=0&hl=en

iex> Reporter.GooglePlay.review_url(“com.android.chrome”, “jp”) “https://play.google.com/store/getreviews?id=com.android.chrome&reviewSortOrder=0&reviewType=1&pageNum=0&hl=jp

Source
review_url_with_page(droid_package, page_num, locale \\ "en")

Specs:

Return POST message with paging.

Examples

iex> Reporter.GooglePlay.review_url_with_page(“com.android.chrome”, “1”) “https://play.google.com/store/getreviews?id=com.android.chrome&reviewSortOrder=0&reviewType=1&pageNum=1&hl=en

iex> Reporter.GooglePlay.review_url_with_page(“com.android.chrome”, “10” , “jp”) “https://play.google.com/store/getreviews?id=com.android.chrome&reviewSortOrder=0&reviewType=1&pageNum=10&hl=jp

Source
reviews(parsed_html)

Return list of class ‘single-review’.

iex> File.read!(“./test/data/google_post.html”) |> Floki.parse |> Enum.drop(1) |> Reporter.GooglePlay.reviews |> Enum.at(0) {“div”, [{"class", "single-review"}], [{“a”, [{"href", "/store/people/details?id=104642741116962989509"}], [{“img”,

[{"class", "author-image"},
 {"alt", "森本真治 avatar image"},
 {"src",
  "https://lh3.googleusercontent.com/uFp_tsTJboUY7kue5XAsGA=w48-c-h48"}],
[]}]},

{“div”, [{“class”, “review-header”}, {“data-expand-target”, “”}, {“data-reviewid”,

"gp:AOqpTOG_ApTgL86SmNCfvsb9M_zf6KrN6SaZtJL40yOAD2GQxUzWS0XXjdEpOBsKHLMU1MHNj1Tfs27qlGN6GJw"}],

[{“div”, [{"class", "review-info"}],

[{"span", [{"class", "author-name"}],
  [{"a",
    [{"href",
      "/store/people/details?id=104642741116962989509"}],
    ["森本真治"]}]},
 {"span", [{"class", "review-date"}], ["2015年6月20日"]},
 {"a",
  [{"class", "reviews-permalink"},
   {"href",
    "/store/apps/details?id=com.android.chromeu0026amp;reviewId=Z3A6QU9xcFRPR19BcFRnTDg2U21OQ2Z2c2I5TV96ZjZLck42U2FadEpMNDB5T0FEMkdReFV6V1MwWFhqZEVwT0JzS0hMTVUxTUhOajFUZnMyN3FsR042R0p3"},
   {"title", "このレビューへのリンクです"}], []},
 {"div",
  [{"class", "review-source"}, {"style", "display:none"}], []},
 {"div", [{"class", "review-info-star-rating"}],
  [{"div",
    [{"class", "tiny-star star-rating-non-editable-container"},
     {"aria-label",
      "5つ星のうち1つ星で評価しました"}],
    [{"div",
      [{"class", "current-rating"}, {"style", "width: 20%;"}],
      []}]}]}]},

{“div”, [{"class", "rate-review-wrapper"}],

[{"div",
  [{"class", "play-button icon-button small rate-review"},
   {"title", "スパムとして報告します"},
   {"data-rating", "SPAM"}],
  [{"div", [{"class", "icon spam-flag"}], []}]},
 {"div",
  [{"class", "play-button icon-button small rate-review"},
   {"title", "役に立ったことを報告します"},
   {"data-rating", "HELPFUL"}],
  [{"div", [{"class", "icon thumbs-up"}], []}]},
 {"div",
  [{"class", "play-button icon-button small rate-review"},
   {"title",
    "役に立たなかったことを報告します"},
   {"data-rating", "UNHELPFUL"}],
  [{"div", [{"class", "icon thumbs-down"}], []}]}]}]},

{“div”, [{"class", "review-body"}], [{“span”, [{"class", "review-title"}], ["不具合多すぎ"]}, “ 戻るがきかない、軽いのがうりなのにどんどん重くなるなど微妙につかえないブラウザになってます…数ヶ月まったく治らないのでいい加減見限ろうかと。 “, {“div”, [{"class", "review-link"}, {"style", "display:none"}],

[{"a",
  [{"class", "id-no-nav play-button tiny"}, {"href", "#"},
   {"target", "_blank"}], ["全文を表示"]}]}]}]}
Source