Reporter v0.7.0 Reporter.GooglePlay View Source

Link to this section Summary

Functions

Parse some XML parsed unicode caractor to special charactors

Return list of review body

Return list of review body which exclude blank titles

Return list of review infos

Return summary of reviews as List

Return list of review titles which exclude blank titles

Return list of review titles

Return list of class ‘single-review’

Link to this section Functions

Link to this function convert_unicode_xml(string) View Source
convert_unicode_xml(String.t) :: String.t

Parse some XML parsed unicode caractor to special charactors.

Examples

iex> Reporter.GooglePlay.convert_unicode_xml(“u0022u0026u0027u003cu003e”) “\”&\’<>”

Link to this function params_with_page(droid_package, page_num, locale \\ "en") View Source
Link to this function review_bodies(parsed_html) View Source
review_bodies(String.t) :: String.t

Return list of review body.

Example

iex> File.stream!(“./test/data/google_post.html”) |> Enum.into(“”) |> 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"}], ["全文を表示"]}]}]}
Link to this function review_body_list(parsed_html) View Source
review_body_list(String.t) :: String.t

Return list of review body which exclude blank titles.

Example

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

Link to this function review_infos(parsed_html) View Source
review_infos(String.t) :: String.t

Return list of review infos.

Example

iex> File.stream!("./test/data/google_post.html") |> Enum.into("") |> Floki.parse |> Enum.drop(1) |> Reporter.GooglePlay.review_infos |> Enum.at(3)
{"div", [{"class", "review-info"}],
[{"span", [{"class", "author-name"}], []},
 {"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%;"}],
      []}]}]}]}
Link to this function review_summaries(parsed_html) View Source
review_summaries(String.t) :: String.t

Return summary of reviews as List.

iex> File.stream!("./test/data/google_post.html") |> Enum.into("") |> Floki.parse  |> Enum.drop(1) |> Reporter.GooglePlay.review_summaries |> Enum.at(0)
%{"date" => "2015年6月20日", "author" => "森本真治",
        "author_link" => "https://play.google.com/store/people/details?id=104642741116962989509",
        "id" => "gp:AOqpTOG_ApTgL86SmNCfvsb9M_zf6KrN6SaZtJL40yOAD2GQxUzWS0XXjdEpOBsKHLMU1MHNj1Tfs27qlGN6GJw",
        "permalink" => "https://play.google.com/store/apps/details?id=com.android.chrome&reviewId=Z3A6QU9xcFRPR19BcFRnTDg2U21OQ2Z2c2I5TV96ZjZLck42U2FadEpMNDB5T0FEMkdReFV6V1MwWFhqZEVwT0JzS0hMTVUxTUhOajFUZnMyN3FsR042R0p3",
        "rating" => 1.0,
        "title" => "不具合多すぎ",
        "body" => " 戻るがきかない、軽いのがうりなのにどんどん重くなるなど微妙につかえないブラウザになってます…数ヶ月まったく治らないのでいい加減見限ろうかと。 "}
Link to this function review_title_list(parsed_html) View Source
review_title_list(String.t) :: String.t

Return list of review titles which exclude blank titles.

Example

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

Link to this function review_titles(parsed_html) View Source
review_titles(String.t) :: String.t

Return list of review titles.

Example

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

Link to this function review_url(droid_package, locale \\ "en") View Source
review_url(String.t, String.t) :: String.t

Return POST message.

Examples

iex> Reporter.GooglePlay.review_url(“com.android.chrome”) “https://play.google.com/store/getreviews?id=com.android.chrome&xhr=1&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&xhr=1&reviewSortOrder=0&reviewType=1&pageNum=0&hl=jp”

Link to this function review_url_with_page(droid_package, page_num, locale \\ "en") View Source
review_url_with_page(String.t, String.t, String.t) :: String.t

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&xhr=1&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&xhr=1&reviewSortOrder=0&reviewType=1&pageNum=10&hl=jp”

Return list of class ‘single-review’.

iex> File.stream!("./test/data/google_post.html") |> Enum.into("") |> 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"}], ["全文を表示"]}]}]}]}