Live data from Hacker News

PhantomJS: Archiving the project, suspending development

github.com

61–70 of 138 posts

Re: PhantomJS: Archiving the project, suspending development

#61
post #57

I do lightweight web automation via Chromiums "Snippets". It is super nice to work that way because you see on screen what happens and can check everything realtime in the console. Only problem is that they dont survive page loads. So when my snippet navigates to a new url I have to trigger it again manually. What would be a good way to progress from here so I can automate across pages?

Greasemonkey and its descendants (e.g. Violentmonkey) can run user scripts which work across pages.

Re: PhantomJS: Archiving the project, suspending development

#62
post #24

I’m super biased in this, having spend considerable time programming against PhantomJs, Selenium and now Headless Chrome / Puppeteer for my startup https://checklyhq.com . This whole area of automating browser interactions is an extremely hard thing to get stable. In my experience, the recent Puppeteer library takes the cake but PhantomJs is the spiritual father here. I will not talk about Selenium for blood pressure…

Having dabbled with both selenium and phantom, I can vouch for both being PITA to work with.

Re: PhantomJS: Archiving the project, suspending development

#64

Earlier quoted context omitted.

A bit concerning, as youtube-dl relies on PhantomJS currently.

youtube-dl will do fine. It is updated once in several days, and with that activity count, I think they will transition to headless chrome in no time.

Amazingly, youtube-dl works very reliably in Termux[1]. I can't see that surviving a transition to headless Chrome.

[1] https://termux.com/

Re: PhantomJS: Archiving the project, suspending development

#65

Earlier quoted context omitted.

I really hope Microsoft offers a headless IE / Edge at some point. It would be amazing to be able to use all 3 major browsers like this. Heck, get Safari in there too (though I feel like it should be doable with WebKit already).

Huh? They have had the WebBrowser ActiveX control since IE3 I think. That works as headless as you get on Windows.

Not quite. It's my understanding it's not as up to date or equivalent to the latest IE. When I tried looking around I just got a lot of confusing information about the control, how it applies (or doesn't) traditional IE hacks, etc.

Though I could be wrong but it didn't seem like an equivalent to headless chrome or firefox.

Re: PhantomJS: Archiving the project, suspending development

#66
post #57

I do lightweight web automation via Chromiums "Snippets". It is super nice to work that way because you see on screen what happens and can check everything realtime in the console. Only problem is that they dont survive page loads. So when my snippet navigates to a new url I have to trigger it again manually. What would be a good way to progress from here so I can automate across pages?

Greasemonkey and its descendants (e.g. Violentmonkey) can run user scripts which work across pages.

Maybe it is even easier to write a Chrome extension?

Re: PhantomJS: Archiving the project, suspending development

#67

Chrome and Firefox gaining headless modes is the ultimate goal Phantom could've achieved. So I consider it a complete success. Kudos to all contributors.

Does headless chrome do PDF generation? That's the only thing I'm using phantom for at the moment.

Re: PhantomJS: Archiving the project, suspending development

#68
post #67

Chrome and Firefox gaining headless modes is the ultimate goal Phantom could've achieved. So I consider it a complete success. Kudos to all contributors.

Does headless chrome do PDF generation? That's the only thing I'm using phantom for at the moment.

Yes.

In fact, there's a command line switch for it https://developers.google.com/web/updates/2017/04/headless-c...

The Chrome team also make Puppeteer, a node's library for interfacing with headless chrome, and has methods for making PDFs as well https://github.com/GoogleChrome/puppeteer

Re: PhantomJS: Archiving the project, suspending development

#69
post #67

Chrome and Firefox gaining headless modes is the ultimate goal Phantom could've achieved. So I consider it a complete success. Kudos to all contributors.

Does headless chrome do PDF generation? That's the only thing I'm using phantom for at the moment.

First result:

--print-to-pdf

https://developers.google.com/web/updates/2017/04/headless-c...

Re: PhantomJS: Archiving the project, suspending development

#70
post #67

Chrome and Firefox gaining headless modes is the ultimate goal Phantom could've achieved. So I consider it a complete success. Kudos to all contributors.

Does headless chrome do PDF generation? That's the only thing I'm using phantom for at the moment.

Yes.

It's really easy to do using [puppeteer](https://github.com/GoogleChrome/puppeteer). The 2nd or 3rd example is PDF.

Post reply on HN