diff --git a/scrape.py b/scrape.py index f9b5878..8427481 100755 --- a/scrape.py +++ b/scrape.py @@ -72,6 +72,14 @@ for user_str in users_to_process: track_count = soup.find('a', href='/' + user.url_username + '/tracks', class_='infoStats__statLink').div.string user.track_count = track_count + # Grab their following count + following_count = soup.find('a', href='/' + user.url_username + '/following', class_='infoStats__statLink').div.string + user.following_count = following_count + + # Grab their follower count + follower_count = soup.find('a', href='/' + user.url_username + '/followers', class_='infoStats__statLink').div.string + user.follower_count = follower_count + # Grab their like count like_count_elem = soup.find('a', href='/' + user.url_username + '/likes').find(class_='sidebarHeader__actualTitle') if like_count_elem: @@ -84,5 +92,7 @@ driver.quit() for _, user in user_dict.items(): print(user.username) - print(' ' + user.track_count + ' tracks') - print(' ' + user.like_count + ' likes') + print(' ' + str(user.track_count) + ' tracks') + print(' ' + str(user.like_count) + ' likes') + print(' Following ' + str(user.following_count)) + print(' Followed by ' + str(user.follower_count))