diff --git a/lib/screens/trending.dart b/lib/screens/trending.dart index d2e22ad..26a5d8f 100644 --- a/lib/screens/trending.dart +++ b/lib/screens/trending.dart @@ -60,17 +60,20 @@ class _TrendingScreenState extends State { ?.replaceAll(RegExp(r''), ''), 'stargazers': { 'totalCount': item.children[3] - .querySelectorAll('a')[0] + .querySelector('.octicon-star') + ?.parent ?.innerHtml ?.replaceFirst(RegExp(r'^[\s\S]*svg>'), '') ?.trim() }, 'forks': { - 'totalCount': item.children[3] - .querySelectorAll('a')[1] - ?.innerHtml - ?.replaceFirst(RegExp(r'^[\s\S]*svg>'), '') - ?.trim(), + 'totalCount': item + .querySelector('.octicon-repo-forked') + ?.parent + ?.innerHtml + ?.replaceFirst(RegExp(r'^[\s\S]*svg>'), '') + ?.trim() ?? + 0, }, 'primaryLanguage': lang, 'isPrivate': false,