| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 387c21f commit 60603d2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,13 +1,12 @@ | |||
| 1 | - from browser import fetch | ||
| 1 | + from browser import fetch, alert | ||
| 2 | 2 | ||
| 3 | 3 | def fetch_handler(repos): | |
| 4 | 4 | star_sum = 0 | |
| 5 | 5 | for repo in repos: | |
| 6 | 6 | star_sum += repo['stars'] | |
| 7 | - print(f'Average github trending star count: {star_sum / len(repos)}') | ||
| 8 | - | ||
| 7 | + alert(f'Average github trending star count: {star_sum / len(repos)}') | ||
| 9 | 8 | ||
| 10 | 9 | fetch( | |
| 11 | 10 | 'https://github-trending-api.now.sh/repositories', | |
| 12 | 11 | response_format='json', | |
| 13 | - ).then(fetch_handler) | ||
| 12 | + ).then(fetch_handler, lambda err: alert(f"Error: {err}")) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments