lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 
> At this point I am stuck, how do I specifiy this GET selection string in the
> Lua example above ?

In your current case I'd suggest something like:

    url1= [[/sport/football/results]]

    http.request(
        {
            url = [[http://www.bbc.co.uk]]..url1,
            sink = ltn12.sink.file(fileHandle),
        })

and operate with "url1" variable (there will be GET request with exactly it's 
content.

But...

Are you sure that you want exactly luasocket and ltn12? ;)

There is luacurl (C) and luahtmlparser (pure Lua) libraries, which, when 
combined, gives some magic powers to easily fetch and parse every site in 
about 10 lines of code :)

-- 
wbr,
mva