Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JoMingyu committed Jan 29, 2024
1 parent 8eab212 commit 882434d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
6 changes: 5 additions & 1 deletion google_play_scraper/constants/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ def build_body(
)
else:
result = self.PAYLOAD_FORMAT_FOR_FIRST_PAGE.format(
app_id=app_id, sort=sort, count=count, score=filter_score_with, device_id=filter_device_with
app_id=app_id,
sort=sort,
count=count,
score=filter_score_with,
device_id=filter_device_with,
)
return result.encode()

Expand Down
26 changes: 22 additions & 4 deletions google_play_scraper/features/reviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@


class _ContinuationToken:
__slots__ = "token", "lang", "country", "sort", "count", "filter_score_with", "filter_device_with"
__slots__ = (
"token",
"lang",
"country",
"sort",
"count",
"filter_score_with",
"filter_device_with",
)

def __init__(self, token, lang, country, sort, count, filter_score_with, filter_device_with):
def __init__(
self, token, lang, country, sort, count, filter_score_with, filter_device_with
):
self.token = token
self.lang = lang
self.country = country
Expand Down Expand Up @@ -93,7 +103,13 @@ def reviews(

try:
review_items, token = _fetch_review_items(
url, app_id, sort, _fetch_count, filter_score_with, filter_device_with, token
url,
app_id,
sort,
_fetch_count,
filter_score_with,
filter_device_with,
token,
)
except (TypeError, IndexError):
token = None
Expand All @@ -115,7 +131,9 @@ def reviews(

return (
result,
_ContinuationToken(token, lang, country, sort, count, filter_score_with, filter_device_with),
_ContinuationToken(
token, lang, country, sort, count, filter_score_with, filter_device_with
),
)


Expand Down

0 comments on commit 882434d

Please sign in to comment.