Skip to content

Commit 728b888

Browse files
authored
added param language; version upgraded (#40)
1 parent c586fbf commit 728b888

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎outscraper/client.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ def yelp_reviews(self, query: Union[list, str], limit: int = 100, sort: str = 'r
798798
return self._request('GET', '/yelp/reviews', wait_async=wait_async, async_request=async_request, params=params)
799799

800800
def tripadvisor_reviews(self, query: Union[list, str], limit: int = 100, cutoff: int = None,
801-
fields: Union[list, str] = None, async_request: bool = False, ui: bool = None, webhook: str = None
801+
fields: Union[list, str] = None, async_request: bool = False, ui: bool = None, webhook: str = None, language: str = 'default',
802802
) -> Union[list, dict]:
803803
'''
804804
Tripadvisor Reviews
@@ -812,17 +812,19 @@ def tripadvisor_reviews(self, query: Union[list, str], limit: int = 100, cutoff:
812812
async_request (bool): parameter defines the way you want to submit your task to Outscraper. It can be set to `False` (default) to send a task and wait until you got your results, or `True` to submit your task and retrieve the results later using a request ID with `get_request_archive`. Each response is available for `2` hours after a request has been completed.
813813
ui (bool): parameter defines whether a task will be executed as a UI task. This is commonly used when you want to create a regular platform task with API. Using this parameter overwrites the async_request parameter to `True`.
814814
webhook (str): parameter defines the URL address (callback) to which Outscraper will create a POST request with a JSON body once a task/request is finished. Using this parameter overwrites the webhook from integrations.
815+
language (str): parameter specifies the language to use for the website. Defaults to "default" (the Tripadvisor domain language); use "all" for reviews in all languages, or a language code such as "ja" for a specific language.
815816
816817
Returns:
817818
list|dict: JSON result
818819
819-
See: https://app.outscraper.com/api-docs#tag/Reviews-and-Comments/paths/~1trustpilot~1reviews/get
820+
See: https://app.outscraper.com/api-docs#tag/Reviews-and-Comments/paths/~1tripadvisor-reviews/get
820821
'''
821822

822823
queries = as_list(query)
823824
wait_async = async_request or limit > 499 or len(queries) > 10
824825
params = {
825826
'query': queries,
827+
'language': language,
826828
'limit': limit,
827829
'cutoff': cutoff,
828830
'async': wait_async,
@@ -831,7 +833,7 @@ def tripadvisor_reviews(self, query: Union[list, str], limit: int = 100, cutoff:
831833
'webhook': webhook,
832834
}
833835

834-
return self._request('GET', '/tripadvisor/reviews', wait_async=wait_async, async_request=async_request, params=params)
836+
return self._request('GET', '/tripadvisor-reviews', wait_async=wait_async, async_request=async_request, params=params)
835837

836838
def apple_store_reviews(self, query: Union[list, str], limit: int = 100, sort: str = 'mosthelpful', cutoff: int = None,
837839
fields: Union[list, str] = None, async_request: bool = False, ui: bool = None, webhook: str = None

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def readme():
88

99
setup(
1010
name='outscraper',
11-
version='6.0.4',
11+
version='6.0.5',
1212
description='Python bindings for the Outscraper API',
1313
long_description=readme(),
1414
classifiers = ['Programming Language :: Python',

0 commit comments

Comments
 (0)