Skip to content

Commit c2b82ec

Browse files
authored
Update README.md
1 parent 3658b1e commit c2b82ec

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

examples/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,21 @@ for place in results:
6565
for review in place.get('reviews_data', []):
6666
print('review:', review['review_text'])
6767
```
68+
69+
## Example 4: Scrap Only New Reviews
70+
71+
```python
72+
results = api_client.google_maps_reviews_v3(
73+
["ChIJN5X_gWdZwokRck9rk2guJ1M", "ChIJxWLy8DlawokR1jvfXUPSTUE"],
74+
reviewsLimit=1000,
75+
limit=1,
76+
sort='newest',
77+
cutoff=1654596109, # the maximum timestamp value for reviews (oldest review you want to extract). Can be used to scrape only the new reviews since your latest update
78+
)
79+
80+
for place in results:
81+
print('name:', place['name'])
82+
new_reviews = place.get('reviews_data', []))
83+
print('new reviews', len(new_reviews))
84+
```
85+

0 commit comments

Comments
 (0)