I'm trying to go to the next page but i had the error request denied i managed a code and i got juste 20 records i used also sleep to hold up the request but without any chance can you help me please:
from googleplaces import GooglePlaces, types, lang
from unidecode import unidecode
import json
import time
import requests
YOUR_API_KEY = 'AIzaSyAZo0lBWrvWa_aOnt1goJl5Z1imYg0tv-k'
google_places = GooglePlaces(YOUR_API_KEY)
query_result = google_places.nearby_search(
lat_lng={'lat' : 46.1667, 'lng' : -1.15},
radius=5000,
types=[types.TYPE_RESTAURANT] or [types.TYPE_CAFE] or [type.TYPE_BAR] or [type.TYPE_CASINO])
time.sleep(10)
for place in query_result.places:
place.get_details()
print place.place_id
print unidecode(place.name)
if query_result.has_next_page_token:
query_result_next_page = google_places.nearby_search(
pagetoken=query_result.next_page_token)
for pl in query_result.places:
pl.get_details()
print pl.place_id
#places.append(place.place_id)
print unidecode(pl.name)