Fixed 'On Tour' section breaking like count
This commit is contained in:
parent
3a2f5d1932
commit
a2fdec3e27
@ -34,6 +34,7 @@ USER_MAX_FOLLOWERS = 25
|
|||||||
|
|
||||||
import time
|
import time
|
||||||
import shelve
|
import shelve
|
||||||
|
import re
|
||||||
import networkx as nx
|
import networkx as nx
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
@ -137,7 +138,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(class_='sidebarHeader__actualTitle')
|
like_count_elem = soup.find(class_='sidebarHeader__actualTitle', text=re.compile(r'^[\S]*?\ likes$'))
|
||||||
if like_count_elem:
|
if like_count_elem:
|
||||||
user.like_count = Human_Str_To_Int(str(like_count_elem.string.split(' ')[0]))
|
user.like_count = Human_Str_To_Int(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