php - How can i download style with xpath? -


i have problem download style,exactly color style. tried download xpath,before use curl download website. color website: https://www.microsoft.com/en-us/store/apps/talking-ginger/9nblggh0c0j7 need orange(#d1480e) , gray(#d2d2d2) colors stars. how can ??

i tried :

$x=$xpath->query("//*[@class='icon-star']");   var_dump( $x->getattribute('style')); 

as marc said, xpath not parsing css; it's selecting nodes xml (or html) trees. @ best, you'll <style> element, can't individual css styles.

a tool parsing , selecting styles cssparser or its php implemention.


Comments