Skip to content

Commit

Permalink
1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
JoMingyu committed Jun 7, 2024
1 parent 1960f86 commit ce1df6d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions google_play_scraper/utils/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def post(url: str, data: Union[str, bytes], headers: dict) -> str:
except Exception as e:
last_exception = e
continue
if 'com.google.play.gateway.proto.PlayGatewayError' in resp:
if "com.google.play.gateway.proto.PlayGatewayError" in resp:
rate_exceeded_count += 1
last_exception = Exception('com.google.play.gateway.proto.PlayGatewayError')
time.sleep(RATE_LIMIT_DELAY*rate_exceeded_count)
last_exception = Exception("com.google.play.gateway.proto.PlayGatewayError")
time.sleep(RATE_LIMIT_DELAY * rate_exceeded_count)
continue
return resp
raise last_exception
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "google-play-scraper"
version = "1.2.6"
version = "1.2.7"
description = "Google-Play-Scraper provides APIs to easily crawl the Google Play Store for Python without any external dependencies!"
authors = ["JoMingyu <[email protected]>"]
license = "MIT"
Expand Down
4 changes: 1 addition & 3 deletions tests/e2e_tests/test_reviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ def test_sort_by_newest(self):
self.assertTrue(r["score"] >= 1)
self.assertTrue(r["thumbsUpCount"] >= 0)
# self.assertTrue(r["appVersion"]) # FIXME: appVersion is not always available
self.assertTrue(
r["at"] < datetime.now()
)
self.assertTrue(r["at"] < datetime.now())

if r["reviewCreatedVersion"]:
review_created_version_contained_review_count += 1
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e_tests/test_reviews_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class TestReviewsAll(TestCase):
def test_request_once(self):
with patch(
"google_play_scraper.features.reviews.reviews", wraps=reviews
"google_play_scraper.features.reviews.reviews", wraps=reviews
) as mock_reviews:
result = reviews_all("co.kr.uaram.userdeliver_")
self.assertEqual(1, mock_reviews.call_count)
Expand All @@ -19,7 +19,7 @@ def test_request_once(self):

def test_request_multiple_times(self):
with patch(
"google_play_scraper.features.reviews.reviews", wraps=reviews
"google_play_scraper.features.reviews.reviews", wraps=reviews
) as mock_reviews:
result = reviews_all("co.kr.uaram.userdeliver_", lang="ko", country="kr")

Expand Down

0 comments on commit ce1df6d

Please sign in to comment.