[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Recommended way to download and parse web pages?
- From: Thijs Schreijer <thijs@...>
- Date: Fri, 15 May 2015 21:56:51 +0000
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org] On
> Behalf Of Gilles
> Sent: vrijdag 15 mei 2015 15:06
> To: email@example.com
> Subject: Recommended way to download and parse web pages?
> I'm a semi-Lua newbie.
> I need to fetch web pages and extract infos from each of them.
> I have LuaRocks installed, and was wondering what packages are
> recommended for this.
> Thank you.
I think you would need a 'fetching' and a 'parsing' element. For fetching you could use Copas , which has recently gained async client support for http(s) (luasec required for the 's' part). See this example  for fetching multiple pages simultaneously/async.
For parsing; depends on the complexity. If it's simple, use lua patterns. Otherwise the proposed lua-gumbo seems a good fit (just read the readme, have no experience with it).