nhtp/examples/find.nim

8 lines
240 B
Nim
Raw Normal View History

2020-11-02 19:59:15 +01:00
import engine, httpclient, strtabs
var html = Engine(html: newHttpClient().getContent("http://example.com"))
2020-11-02 20:00:29 +01:00
echo html.find("title").getAllText()
2020-11-02 19:59:15 +01:00
echo html.find("meta", args={"http-equiv": "Content-type"}.newStringTable).args["content"]