Upgrade to Pro — share decks privately, control downloads, hide ads and more …

impression of google chrome headless

impression of google chrome headless

teitei_tk

May 31, 2017
Tweet

More Decks by teitei_tk

Other Decks in Programming

Transcript

  1. PhantomJS is Dead • ͦͯ͠།Ұͷϝϯςφ͕ࠓޙ͸ΈͳChrome Headlessʹ ৐Γ׵͑ΔͩΖ͏ͱϝϯςφΛࣙ೚Λએݴɻ • https://groups.google.com/d/msg/phantomjs/9aI5d- LDuNE/5Z3SMZrqAQAJ

    • ࠓޙͷߏ૝͸͋Δͷ͔ɺphantomiumͱ͍͏PhantomJS + ChromeHeadlessͷ୯ޠ͕૊Έ߹Θͬͨ͞ϨϙδτϦ͸͋ Δ • https://github.com/Vitallium/phantomium
  2. ؆୯ͳ΋ͷͳΒ͙͢ग़དྷΔ • ShellͰ͙͢ग़དྷΔ • DOMͷग़ྗ • PDF࡞੒ • Ωϟϓνϟͷऔಘ •

    eg. $ chrome --headless --disable-gpu --dump- dom https://www.chromestatus.com/
  3. ॴײ • ҆ఆԽ·Ͱ͸΋͏গֻ͔͠Γͦ͏ɻ • Ṗͷ--disable-gpu Option • API͕·ͩམͪண͍͍ͯͳ͍ͷͰຊ൪౤ೖ͸·ͩආ͚ͨ΄͏ ͕ྑͦ͞͏ •

    ͱ͸͍͑PhantomJSͷޙ佂ʹ͸࠲Γͦ͏ɻ • ಈ޲͸௥͓͖ͬͯ·͢ɻ • Կ͔͋ͬͨΒهࣄͰ΋ॻ͍ͯڞ༗͠·͢ɻ