0

Is it possible to get the computed style of different HTML tags from an external URL?

getComputedStyle helps me to get the computed style from my own web page, but I would like to extract CSS values of different elements from other web pages.

What I'm trying to find out is for example: font-size of H1 elements and color of H2 elements from a given URL like http://www.smashingmagazine.com/.

Is this possible? (maybe using a NodeJS express server and ajax?) Thank you in advance for your help!

1 Answers1

1

Sure, it's possible if you use PhantomJS. PhantomJS acts like a browser without a display. You can use it to inject scripts into a page that can send information about the web page back to your node server.

Daniel
  • 38,041
  • 11
  • 92
  • 73