All Projects → fefit → visdom

fefit / visdom

Licence: MIT license
A library use jQuery like API for html parsing & node selecting & node mutation, suitable for web scraping and html confusion.

Programming Languages

rust
11053 projects
go
31211 projects - #10 most used programming language
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to visdom

Dom
Modern DOM API.
Stars: ✭ 88 (+10%)
Mutual labels:  css-selector, dom-manipulation
normas
Normal Lightweight Javascript Framework for server-side render compatible with Turbolinks
Stars: ✭ 32 (-60%)
Mutual labels:  dom-manipulation
Css Selector
The CssSelector component converts CSS selectors to XPath expressions.
Stars: ✭ 6,928 (+8560%)
Mutual labels:  css-selector
Sqrape
Simple Query Scraping with CSS and Go Reflection (MOVED to Gitlab)
Stars: ✭ 144 (+80%)
Mutual labels:  css-selector
Ripple Without Js
Create Material Design ripple effect in your HTML without using a single line of JS.
Stars: ✭ 53 (-33.75%)
Mutual labels:  css-selector
pupflare
A webpage proxy that request through Chromium (puppeteer) - can be used to bypass Cloudflare anti bot / anti ddos on any application (like curl)
Stars: ✭ 183 (+128.75%)
Mutual labels:  scrape
Surgeon
Declarative DOM extraction expression evaluator. 👨‍⚕️
Stars: ✭ 653 (+716.25%)
Mutual labels:  css-selector
stweet
Advanced python library to scrap Twitter (tweets, users) from unofficial API
Stars: ✭ 287 (+258.75%)
Mutual labels:  scrape
readability-cli
A CLI for Mozilla Readability. Get clean, uncluttered, ready-to-read HTML from any webpage!
Stars: ✭ 41 (-48.75%)
Mutual labels:  scrape
Floki
Floki is a simple HTML parser that enables search for nodes using CSS selectors.
Stars: ✭ 1,642 (+1952.5%)
Mutual labels:  css-selector
Soupsieve
A modern CSS selector implementation for BeautifulSoup
Stars: ✭ 95 (+18.75%)
Mutual labels:  css-selector
Browser Monkey
Reliable DOM testing
Stars: ✭ 53 (-33.75%)
Mutual labels:  css-selector
necktie
Necktie – a simple DOM binding tool
Stars: ✭ 43 (-46.25%)
Mutual labels:  dom-manipulation
Modest
CSS selectors for HTML5 Parser myhtml
Stars: ✭ 47 (-41.25%)
Mutual labels:  css-selector
m4q
Small library for DOM manipulation and animation. This library similar to jQuery, but written more simply.
Stars: ✭ 30 (-62.5%)
Mutual labels:  dom-manipulation
Apifier
Apifier is a very simple HTML parser written in Python based on CSS selectors
Stars: ✭ 5 (-93.75%)
Mutual labels:  css-selector
Cascadia
Go cascadia package command line CSS selector
Stars: ✭ 67 (-16.25%)
Mutual labels:  css-selector
Tq
Perform a lookup by CSS selector on an HTML input
Stars: ✭ 193 (+141.25%)
Mutual labels:  css-selector
scrapers
scrapers for building your own image databases
Stars: ✭ 46 (-42.5%)
Mutual labels:  scrape
pyscrapers
Scrapers for vk, facebook, instagram and more
Stars: ✭ 18 (-77.5%)
Mutual labels:  scrape

Visdom

Build Status crates.io tag codecov Crates download docs.rs GitHub license

API Document     Online Demos     Performance     中文 API 文档     更新文档

🏠 A html parsing & node selecting and mutation library written in Rust, using APIs similar to jQuery, left off the parts thoes only worked in the browsers(e.g. render and event related methods).

It's not only helpful for the working with html scraping, but also have useful APIs to mutate text nodes, so you can use it for mixing your html with dirty html fragement, and keep the web scrapers away. 💖

Usage

use visdom::Vis;
use visdom::types::BoxDynError;

fn main() -> Result<(), BoxDynError>{
  let html = r##"
    <!DOCTYPE html>
    <html>
      <head>
        <meta charset="utf-8" />
      </head>
      <body>
        <nav id="header">
          <ul>
            <li>Hello,</li>
            <li>Vis</li>
            <li>Dom</li>
          </ul>
        </nav>
      </body>
    </html>
  "##;
  // load html
  let root = Vis::load(html)?;
  let lis = root.find("#header li");
  let lis_text = lis.text();
  println!("{}", lis_text);
  // will output "Hello,VisDom"
  Ok(())
}

Try it online

Feature flags

After version v0.5.0, visdom add some feature flags to support conditional compilation for different usage.

Feature Description API Config
destory When you don't need remove or clear the elements, you can ignore this feature flag. .remove() .empty() (IElementTrait) remove_child() visdom = { version = xxx, features = ["destory"]}
insertion When you don't need mutation the DOM, you can ignore this feature flag. append() append_to() prepend() prepend_to() insert_after() after() insert_before() before() replace_with() visdom = { version = xxx, features = ["insertion"]}
text When you don't need mutation the TextNode, you can ignore this feature flag. .texts() .texts_by() texts_by_rec() visdom = { version = xxx, features = ["text"]}
full When you need all the API above, you can open this feature flag. - visdom = { version = xxx, features = ["full"]}

Depedencies

Questions & Advices & Bugs?

Welcome to report Issue to us if you have any question or bug or good advice.

License

MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].