Skip to content

Commit

Permalink
Merge pull request #3 from mochico/fix-play_store_dom_hierarchy
Browse files Browse the repository at this point in the history
fix play store dom hierarchy
  • Loading branch information
Konboi committed Sep 13, 2016
2 parents 6816ef1 + 5abcd60 commit 5a8df5b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ const (
TABLE_NAME = "review"
BASE_URI = "https://play.google.com"
REVIEW_CLASS_NAME = ".single-review"
AUTHOR_NAME_CLASS_NAME = ".review-info span.author-name a"
REVIEW_DATE_CLASS_NAME = ".review-info .review-date"
AUTHOR_NAME_CLASS_NAME = ".review-header .review-info span.author-name"
REVIEW_LINK_CLASS_NAME = ".review-header .review-info .reviews-permalink"
REVIEW_DATE_CLASS_NAME = ".review-header .review-info .review-date"
REVIEW_TITLE_CLASS_NAME = ".review-body .review-title"
REVIEW_MESSAGE_CLASS_NAME = ".review-body"
REVIEW_RATE_CLASS_NAME = ".review-info-star-rating .tiny-star"
Expand Down Expand Up @@ -194,7 +195,7 @@ func GetReview(config Config) (Reviews, error) {
authorNode := s.Find(AUTHOR_NAME_CLASS_NAME)

authorName := authorNode.Text()
authorUri, _ := authorNode.Attr("href")
permalink, _ := s.Find(REVIEW_LINK_CLASS_NAME).Attr("href")

dateNode := s.Find(REVIEW_DATE_CLASS_NAME)

Expand All @@ -213,7 +214,7 @@ func GetReview(config Config) (Reviews, error) {

review := Review{
Author: authorName,
AuthorUri: authorUri,
AuthorUri: permalink,
Title: reviewTitle,
Message: reviewMessage,
Rate: rate,
Expand Down

0 comments on commit 5a8df5b

Please sign in to comment.