Skip to content

Commit

Permalink
wait_async for reviews_limit = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
vs committed Feb 7, 2024
1 parent b2b5171 commit c531f9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions outscraper/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def google_maps_reviews(self, query: Union[list, str], reviews_limit: int = 10,
Parameters:
query (list | str): parameter defines the query you want to search. You can use anything that you would use on a regular Google Maps site. Additionally, you can use google_id, place_id or urls to Google Maps places. Using a lists allows multiple queries (up to 50) to be sent in one request and save on network latency time.
reviews_limit (int): parameter specifies the limit of reviews to extract from one place.
reviews_limit (int): parameter specifies the limit of reviews to extract from one place (0 - unlimited).
limit (str): parameter specifies the limit of places to take from one query search.
sort (str): parameter specifies one of the sorting types. Available values: "most_relevant", "newest", "highest_rating", "lowest_rating".
start (int): parameter specifies the start timestamp value for reviews (newest review). The current timestamp is used when the value is not provided. Using the start parameter overwrites sort parameter to newest.
Expand All @@ -411,7 +411,7 @@ def google_maps_reviews(self, query: Union[list, str], reviews_limit: int = 10,
See: https://app.outscraper.com/api-docs#tag/Google/paths/~1maps~1reviews-v3/get
'''
queries = as_list(query)
wait_async = async_request or reviews_limit > 499 or len(queries) > 10
wait_async = async_request or reviews_limit > 499 or reviews_limit == 0 or len(queries) > 10

response = requests.get(f'{self._api_url}/maps/reviews-v3', params={
'query': queries,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def readme():

setup(
name='outscraper',
version='5.0.0',
version='5.0.1',
description='Python bindings for the Outscraper API',
long_description=readme(),
classifiers = ['Programming Language :: Python',
Expand Down

0 comments on commit c531f9a

Please sign in to comment.