Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How to parse JavaScript from Zsh?



On Thu, Oct 31, 2013 at 10:59 PM, Thiago Padilha <tpadilha84@xxxxxxxxx> wrote:
> Perhaps they are sending just JSON and you mistake with javascript? If its
> just json you can try this https://github.com/micha/jsawk it targets bash
> but should work with zsh.

Well, this sent me back looking more closely at it… yes, it was
javascript… but the good news is that when I started poking around I
found that the information I wanted was being pulled (via JS) from a
regular HTML page.

So now I'm just parsing that using curl, sed, and tr.

(You can even see it at https://gist.github.com/tjluoma/7260924 if you
want, but I warn you: it's ugly. But it works.)

Thanks!

TjL



Messages sorted by: Reverse Date, Date, Thread, Author