JuliaWeb / Gumbo.jl

Julia wrapper around Google's gumbo C library for parsing HTML
Other
154 stars 25 forks source link

readhtml function (or read(fname, HTMLDocument)) #70

Open s-celles opened 5 years ago

s-celles commented 5 years ago

Hello,

Gumbo have a parsehtml function but reading HTML from file can be do using

parsehtml(read(filename, String))

Maybe a readhtml function should be defined as

readhtml(filename, args... ; kwargs...) = parsehtml(read(filename, String), args...; kwargs...)

An other API idea could be (to mimic read API) to have the following functions:

parse(HTMLDocument, input)

and

read(filename, HTMLDocument)

What is your opinion about such API idea?

Kind regards

s-celles commented 5 years ago

An other approach could be to integrate with FileIO.jl