From: TJ Luoma <luomat@gmail.com>
To: Thiago Padilha <tpadilha84@gmail.com>
Cc: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: How to parse JavaScript from Zsh?
Date: Fri, 1 Nov 2013 01:58:47 -0400 [thread overview]
Message-ID: <CADjGqHtcF3QMaRuDCar=diqUPKf=0Wmhr0qe4rPMYSXMVGdpbw@mail.gmail.com> (raw)
In-Reply-To: <CAAq2Xdq8oNg6TtUgG3c3j3cJn2OrBS1ngLWP=YjL4XyR6h8mYw@mail.gmail.com>
On Thu, Oct 31, 2013 at 10:59 PM, Thiago Padilha <tpadilha84@gmail.com> 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
next prev parent reply other threads:[~2013-11-01 5:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 2:52 TJ Luoma
2013-11-01 2:59 ` Thiago Padilha
2013-11-01 5:58 ` TJ Luoma [this message]
2013-11-01 3:04 ` Abhijeet Rastogi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADjGqHtcF3QMaRuDCar=diqUPKf=0Wmhr0qe4rPMYSXMVGdpbw@mail.gmail.com' \
--to=luomat@gmail.com \
--cc=tpadilha84@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).