lljz66 commited on
Commit
451a703
·
verified ·
1 Parent(s): 7e71ce4

Upload google_play_scraper/examples/basic_usage.py

Browse files
google_play_scraper/examples/basic_usage.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Basic usage examples."""
2
+ from google_play_scraper import app, search
3
+
4
+
5
+ def get_app_info():
6
+ """Get single app info."""
7
+ result = app("com.facebook.katana")
8
+ print(f"App: {result['title']}, Rating: {result['rating']}")
9
+
10
+
11
+ def search_apps():
12
+ """Search for apps."""
13
+ results = search("social media")
14
+ for app in results:
15
+ print(f"{app['title']} - {app['rating']}")
16
+
17
+
18
+ if __name__ == "__main__":
19
+ get_app_info()
20
+ search_apps()