I guess I can cheat by intercepting the request and respond with the html I already have. But I wonder if there is already something existing.
Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
21–30 of 39 posts
Re: Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
#22Do you know if it is possible to render a page without serving it from a web server? For example, I have the html of one page of my domain generated by a test. I would like to use puppeteer to render it. But I don't want to setup a http server for this. I would like to give a string with the html + a url to page.goto and let it render the page like it comes from the real server. I guess I can cheat by intercepting th…
Re: Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
#23Earlier quoted context omitted.
Related or not, it seems like a valid point. We switched to chrome headless after a post from thoughtbot made me question Capybara-WebKit's future.
Selenium IDE was discontinued due to the change of extension (from XPI to WebExtension) in Firefox. Nothing to do with Chrome Headless. see https://seleniumhq.wordpress.com/2017/08/09/firefox-55-and-s... and associated HN discussion https://news.ycombinator.com/item?id=15061605
Re: Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
#24Do you know if it is possible to render a page without serving it from a web server? For example, I have the html of one page of my domain generated by a test. I would like to use puppeteer to render it. But I don't want to setup a http server for this. I would like to give a string with the html + a url to page.goto and let it render the page like it comes from the real server. I guess I can cheat by intercepting th…
Re: Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
#25Two things: 1. Please do not test a web app with Chrome only, we don't want to go back to a world with a single browser 2. > So, until puppeteer supports this, we will rely on jsdom, a package available via npm JSDOM is not just a package on npm, it's an engineering piece of art
Re: Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
#26Do you know if it is possible to render a page without serving it from a web server? For example, I have the html of one page of my domain generated by a test. I would like to use puppeteer to render it. But I don't want to setup a http server for this. I would like to give a string with the html + a url to page.goto and let it render the page like it comes from the real server. I guess I can cheat by intercepting th…
You should be able to use a data URI containing the HTML string
Re: Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
#27I have a repo outlining the basics here: https://github.com/jawj/web-scraping-for-researchers
Re: Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
#28Do you know if it is possible to render a page without serving it from a web server? For example, I have the html of one page of my domain generated by a test. I would like to use puppeteer to render it. But I don't want to setup a http server for this. I would like to give a string with the html + a url to page.goto and let it render the page like it comes from the real server. I guess I can cheat by intercepting th…
Re: Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
#29Re: Show HN: Getting started with Puppeteer and Chrome Headless for Web Scraping
#30For example with Puppeteer you can do page.injectFile("jquery-3.2.1.min.js"). I think that would simplify your evaluate() calls.
It would also be easy to speed up the whole process by doing a single evaluate() call per page with all your scraping code in it.
BTW we just released an article with tips & tricks for Headless Chrome: https://blog.phantombuster.com/web-scraping-in-2017-headless... What do you think?