I understand how to obtain the text from a specific div
or span
style from this question: How to find the most common span styles
Now the diff
This may help you:-
from bs4 import BeautifulSoup
import re
usedFontSize = [] #list of all font number used
#Find all the span contains style
spans = soup.find_all('span',style=True)
for span in spans:
#print span['style']
styleTag = span['style']
fontSize = re.findall("font-size:(\d+)px",styleTag)
usedFontSize.append(int(fontSize[0]))
#Find most commanly used font size
from collections import Counter
count = Counter(usedFontSize)
#Print list of all the font size with it's accurence.
print count.most_common()