I am building a crawler using Scrapy. I need to get the font-family assigned to a particular HTML element.
Let's say there is a css file, styles.css, which contains the following:
p {
font-family: "Times New Roman", Georgia, Serif;
}
And in the HTML page there is text as follows:
<p>Hello how are you?</p>
Its easy for me to extract the text using Scrapy, however I would also like to know the font-family applied to Hello how are you?
I am hoping it is simply a case of (imaginary XPATH) /p[font-family] or something like that.
Do you know how I can do this?
Thanks for your thoughts.