Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solution(soup):
- arr = soup.find('ul',attrs={'id': 'pagehistory'}).find_all('li')
- res = {}
- for i in arr:
- s = i.find('span',attrs={'class': 'history-user'}).find('bdi').text
- res[s] = res.setdefault(s, 0)+1
- print(res)
- return max(res, key=res.get)
Advertisement
Add Comment
Please, Sign In to add comment