File size: 628 Bytes
5c330fd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | """Advanced usage examples."""
from google_play_scraper import reviews, collections
from google_play_scraper.utils.caching import clear_cache
def get_reviews_with_caching():
"""Get reviews with caching enabled."""
clear_cache()
app_reviews = reviews("com.facebook.katana", n_pages=5)
print(f"Found {len(app_reviews)} reviews")
def get_top_charts():
"""Get top chart collections."""
top_apps = collections("topselling_free", n_items=100)
for app in top_apps[:10]:
print(f"{app['title']} - {app['installs']}")
if __name__ == "__main__":
get_reviews_with_caching()
get_top_charts() |