outscraper / outscraper-python

The library provides convenient access to the Outscraper API from applications written in the Python language. Allows using Outscraper's services from your code.
https://outscraper.com
MIT License
69 stars 18 forks source link

Use google_maps_reviews_v3 for old reviews #7

Closed elisamercanti closed 1 year ago

elisamercanti commented 2 years ago

Hello, I got an account on the outscraper website and I tried the following request:

`cutoff = 1514761200 start = 1515538800

client = ApiClient(api_key='KEY_FROM_OUTSCRAPER') response = client.google_maps_reviews_v3( 'ChIJ8-wGeU9gLxMR--zJtnpGod4', sort='newest', cutoff=cutoff, start=start, language='it' )`

but it doesn't work and it returns the following error: File "C:\ProgramData\Anaconda3\lib\site-packages\outscraper\api_client.py", line 346, in google_maps_reviews_v3 response = requests.get(f'{self._api_url}/maps/reviews-v3', params={ File "C:\ProgramData\Anaconda3\lib\site-packages\requests\api.py", line 75, in get return request('get', url, params=params, kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", line 655, in send r = adapter.send(request, kwargs) File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

We wanted to get reviews from some years, is it possible?

While i'm at it I'm gonna ask if it's possible to get the reviews in every language or if it's necessary to choose a single language and make a different request for every one.

Thank you!

vlad-stack commented 1 year ago

Thank you for the request!

Sure, but the number of results can be huge! Do you use reviews_limit? Maybe splitting the request into a few requests?

Also, you can use webhook, and receive the event once the data is downlaoded: https://app.outscraper.com/integrations

Please, let me know if it helps!