{"id":2280,"date":"2013-08-22T09:00:43","date_gmt":"2013-08-22T07:00:43","guid":{"rendered":"https:\/\/blogs.ua.es\/pi\/?p=2280"},"modified":"2013-06-12T22:13:47","modified_gmt":"2013-06-12T20:13:47","slug":"un-navegador-web-en-tu-servidor-web","status":"publish","type":"post","link":"https:\/\/blogs.ua.es\/pi\/2013\/08\/22\/un-navegador-web-en-tu-servidor-web\/","title":{"rendered":"Un navegador web en tu servidor web"},"content":{"rendered":"<p>Llevaba tiempo queriendo saber c\u00f3mo se hace esto, c\u00f3mo puedes ejecutar un navegador web en tu servidor web para, por ejemplo, realizar una captura de pantalla y mostrar c\u00f3mo se visualiza una p\u00e1gina web un navegador o para, por ejemplo, tener una representaci\u00f3n de la p\u00e1gina web (con su JavaScript ejecutado, su CSS aplicado) y poder extraer cierta informaci\u00f3n.<\/p>\n<p>Para hacer esto necesitas un <a href=\"http:\/\/blog.arhg.net\/2009\/10\/what-is-headless-browser.html\">headless browser<\/a>, un navegador web sin interfaz gr\u00e1fico. Hay unos cuantos por ah\u00ed fuera, pero parece que uno de los m\u00e1s usados hoy en d\u00eda es <a href=\"http:\/\/phantomjs.org\/\">PhantomJS<\/a>, basado en WebKit (el motor de Google Chrome y Safari), que ofrece:<\/p>\n<blockquote><p>PhantomJS is a headless WebKit with JavaScript API. It has\u00a0<strong>fast<\/strong>\u00a0and\u00a0<strong>native<\/strong>\u00a0support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.<\/p><\/blockquote>\n<p><a href=\"https:\/\/blogs.ua.es\/pi\/files\/2013\/01\/phantomjs.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2281\" src=\"https:\/\/blogs.ua.es\/pi\/files\/2013\/01\/phantomjs-300x154.png\" alt=\"\" width=\"300\" height=\"154\" srcset=\"https:\/\/blogs.ua.es\/pi\/files\/2013\/01\/phantomjs-300x154.png 300w, https:\/\/blogs.ua.es\/pi\/files\/2013\/01\/phantomjs-1024x528.png 1024w, https:\/\/blogs.ua.es\/pi\/files\/2013\/01\/phantomjs.png 1366w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Llevaba tiempo queriendo saber c\u00f3mo se hace esto, c\u00f3mo puedes ejecutar un navegador web en tu &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/blogs.ua.es\/pi\/2013\/08\/22\/un-navegador-web-en-tu-servidor-web\/\"> <span class=\"screen-reader-text\">Un navegador web en tu servidor web<\/span> Read more \u2192<\/a><\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[147152,7073],"class_list":["post-2280","post","type-post","status-publish","format-standard","hentry","category-general","tag-navegador","tag-servidor"],"_links":{"self":[{"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/posts\/2280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/comments?post=2280"}],"version-history":[{"count":5,"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/posts\/2280\/revisions"}],"predecessor-version":[{"id":2835,"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/posts\/2280\/revisions\/2835"}],"wp:attachment":[{"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/media?parent=2280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/categories?post=2280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ua.es\/pi\/wp-json\/wp\/v2\/tags?post=2280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}