Fix like count shown as None
This commit is contained in:
parent
6ebaa47013
commit
3e9a4b5f65
@ -137,7 +137,7 @@ def Get_Basic_Info(user):
|
|||||||
print(' Followers: ' + str(user.follower_count))
|
print(' Followers: ' + str(user.follower_count))
|
||||||
|
|
||||||
# Grab their like count
|
# Grab their like count
|
||||||
like_count_elem = soup.find('a', href='/' + user.url_username + '/likes', class_='sidebarHeader__actualTitle')
|
like_count_elem = soup.find(class_='sidebarHeader__actualTitle')
|
||||||
if like_count_elem:
|
if like_count_elem:
|
||||||
user.like_count = str(like_count_elem.string.split(' ')[0])
|
user.like_count = str(like_count_elem.string.split(' ')[0])
|
||||||
print(' Likes: ' + str(user.like_count))
|
print(' Likes: ' + str(user.like_count))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user