This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

HTML page to Lua table
#1
Hi
Can I convert a webpage (returned as a string from http.request) to a Lua table? M isea is to convert DOM in the same way as json library parse json to table.
Now I parse the webpage using string manipulation functions like match, gsub etc. I don't trust this code so much so I would like to improve my code by a more robust solution. Is there any suitable library in LM?

Thank you

And subquestion: I need to convert the webpage into something LM understands. Which codepage Lua or LM uses internally? Is it UTF8? Is there iconv available in LM?
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply


Messages In This Thread
HTML page to Lua table - by Thomas - 25.02.2017, 22:00
RE: HTML page to Lua table - by admin - 27.02.2017, 07:30

Forum Jump: