Live data from Hacker News

Show HN: Phantom JS interactive editor

phantomjs-pad.ozaur.com

21–30 of 42 posts

Re: Show HN: Phantom JS interactive editor

#22
post #2

Author here: oh no Google banned traffic from my AWS instance and google.com shows blank :-(.

Hi. Small CodeMirror-related nitpick. If you set your editor to be the height of the panel it is in, and let it take care of its own scrollbar, it'll look better (the gutter will span the whole panel) and be more efficient in case of big documents (it'll render only the visible part).

Re: Show HN: Phantom JS interactive editor

#24

I tried with typekit with no success: http://phantomjs-pad.ozaur.com/DrDvxMADoP2TdF652 I was curious with this example, as I have had zero luck getting webfonts to render using PhantomJS so far. Have you had any success rendering webfonts?

The thing with phantomjs and webfonts is that it has an old webkit version which has some bugs with webfont support.

Theres a branch from a phantomjs contributor on github that has bugfixes for webfonts support backported:

https://github.com/Vitallium/phantomjs/tree/fix-WOFF-file-su...

I use phantomjs for html to image rendering and I managed to get webfont support working with a custom build from that branch (working on Heroku)

Re: Show HN: Phantom JS interactive editor

#25

I tried with typekit with no success: http://phantomjs-pad.ozaur.com/DrDvxMADoP2TdF652 I was curious with this example, as I have had zero luck getting webfonts to render using PhantomJS so far. Have you had any success rendering webfonts?

Working example: http://phantomjs-pad.ozaur.com/DrDvxMADoP2TdF652

Re: Show HN: Phantom JS interactive editor

#26
Since the formal semantic failed to become massively used, everyone is trying to make sense of the Web using scraping. It's something most viable sites should want to get behind, from ecommerce where you can find the best price faster to education. But I suspect if a very good shared scraping system were created we'd see countermeasures pretty fast, from timid content producers, as well as the Googles who want to have exclusive access to this level of information. Yet it's a natural layer for a shared commons, and what can be built on that, when finally get past the mess of arbitrary representations, is very exciting. Anyone know of any standard to create interoperable scrapers? In Javascript, of course. Here's one submission: https://github.com/zotero/translators

Re: Show HN: Phantom JS interactive editor

#28
post #7

A shameless plug: https://github.com/scrapinghub/splash is an open source tool similar to Phantom JS, and it has an interactive web editor built-in. The concurrency model in Splash scripts is not the same as in Phantom JS scripts: Splash allows to use loops/ifs/functions in async code without recursion tricks or things like "casper.thenOpen". See http://splash.readthedocs.org/en/latest/scripting-tutorial.h... for mor…

Looks nice! I created a service called Ghost Inspector last spring that runs PhantomJS under the hood: https://ghostinspector.com/

It's not open source, but there's a free tier and lots of nice features built in like video recording, screenshot comparison and a GUI editor.

If anyone is planning to write PhantomJS scripts directly, I strongly recommend checking out CasperJS: http://casperjs.org/ -- It gives you a really nice layer on top that makes Phantom much more wieldy.

Re: Show HN: Phantom JS interactive editor

#30
post #4
post #3

Earlier quoted context omitted.

Yeah, they'll do that :) Can we download this and run it locally? Is the code open sourced somewhere?

Not yet open-sourced or downloaded, but consider doing that. Right now the setup would be too hard to make it smooth.

Put it in a Docker container! :)
Post reply on HN