Content-Length: 273887 | pFad | http://github.com/CyAxe/lhtmlr

26 GitHub - CyAxe/lhtmlr: A fast Lua HTML Parsing/Searching library written in Rust for Lotus Project
Skip to content
/ lhtmlr Public

A fast Lua HTML Parsing/Searching library written in Rust for Lotus Project

License

Notifications You must be signed in to change notification settings

CyAxe/lhtmlr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LHTMLR

A fast Lua HTML Parsing/Searching library written in Rust for Lotus Project

TODO

  • HTML Parsing
  • Generate CSS Selector
    • Element
    • Text
    • Comment
    • Document

Example

local lhtmlr = require("lhtmlr")

local HTML = [[
<!DOCTYPE html>
<html>
  <head>
    <title>My HTML Page</title>
  </head>
  <body>
    <img src="https://images.weserv.nl/?url=profile.png&q=12&output=webp&max-age=110">
    <h1>Welcome to my HTML page</h1>
  </body>
</html>
]]

-- Generate a CSS selector pattern for **custom** Element in the HTML input that has attributes.
local pattern = lhtmlr.css_selector("<img src=\"profile.png\">") -- Type: String
local results = lhtmlr.html_search(HTML, pattern) -- Type: Table

for _,value in pairs(results) do
    print(value)
end

-- <img src="https://images.weserv.nl/?url=profile.png&q=12&output=webp&max-age=110">

Installation

$ luarocks install lua-lhtmlr --local

About

A fast Lua HTML Parsing/Searching library written in Rust for Lotus Project

Resources

License

Stars

Watchers

Forks

Packages

No packages published








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/CyAxe/lhtmlr

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy