diff --git a/google_play_scraper/utils/request.py b/google_play_scraper/utils/request.py index 5de9442..ae1bc6a 100644 --- a/google_play_scraper/utils/request.py +++ b/google_play_scraper/utils/request.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 2bcefd2..d7fdee2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "MIT" diff --git a/tests/e2e_tests/test_reviews.py b/tests/e2e_tests/test_reviews.py index 075a1c3..c7a14c3 100644 --- a/tests/e2e_tests/test_reviews.py +++ b/tests/e2e_tests/test_reviews.py @@ -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 diff --git a/tests/e2e_tests/test_reviews_all.py b/tests/e2e_tests/test_reviews_all.py index 5b01a11..1260acc 100644 --- a/tests/e2e_tests/test_reviews_all.py +++ b/tests/e2e_tests/test_reviews_all.py @@ -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) @@ -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")