Htmlq: like jq, but for html
github.com
Htmlq: like jq, but for html
1–10 of 172 posts
Re: Htmlq: like jq, but for html
#2Super useful. You've created a fantastic tool here. Thank you.
Re: Htmlq: like jq, but for html
#3This is great! Thanks
Re: Htmlq: like jq, but for html
#4Nice!
This is the kind of obvious tool that once it exists, you can’t really grok the fact it did not earlier, and that it took until now to exist.
Re: Htmlq: like jq, but for html
#5brilliant. does this spin up a heavy DOM implementation in the background or do something lighter such as regexp?
Re: Htmlq: like jq, but for html
#6This is nifty! Python + bs4 takes some googling to remember how to parse a webpage. This is just straight forward, thanks so much.
Re: Htmlq: like jq, but for html
#7brilliant. does this spin up a heavy DOM implementation in the background or do something lighter such as regexp?
You can’t parse HTML with regexps. It’s not a regular language.
Re: Htmlq: like jq, but for html
#8brilliant. does this spin up a heavy DOM implementation in the background or do something lighter such as regexp?
Looks like it uses servos html5ever (through kuchiki), so no DOM representation.
Re: Htmlq: like jq, but for html
#9brilliant. does this spin up a heavy DOM implementation in the background or do something lighter such as regexp?
It looks to be using html5ever to parse the HTML, similar to something like BeautifulSoup in Python.
Re: Htmlq: like jq, but for html
#10Nice! This is the kind of obvious tool that once it exists, you can’t really grok the fact it did not earlier, and that it took until now to exist.
> grok
A good opportunity to introduce `gron` to those unfamiliar!
▶ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author"
json[0].commit.author = {};
json[0].commit.author.date = "2016-07-02T10:51:21Z";
json[0].commit.author.email = "mail@tomnomnom.com";
json[0].commit.author.name = "Tom Hudson";
https://github.com/tomnomnom/gron