Comments (3)
https://docs.rs/html5ever/0.26.0/html5ever/tree_builder/struct.TreeBuilderOpts.html#structfield.scripting_enabled, probably. The parse_* functions would need to take an extra argument though.
from scraper.
The parsed result is:
Html {
errors: [],
quirks_mode: NoQuirks,
tree: Tree { Fragment => { Element(<html>) => { Element(<noscript>) => { Text(Tendril<UTF8>(owned: "<h1>Hello, world!</h1>")) } } } },
}
It seems that the content in the script will be treated as Text
, even though it is legal html
from scraper.
Might this be an issue in how we configure html5ever?
from scraper.
Related Issues (20)
- user needs to add selectors crate to Cargo.toml in order to use add_class
- no method named `next_sibling_element` found for struct `ElementRef<'_>` in the current scope HOT 2
- Over 60x performance increase with html.tree.root().traverse() and ego tree walk HOT 2
- Remove Cargo.lock HOT 2
- Disable logging? HOT 2
- how to remove the node? HOT 1
- How to select in pairs? HOT 1
- How to get the number from NodeID HOT 6
- same element? HOT 3
- Allow `Selector` to be const-creatable HOT 3
- Save source code `ElementRef::html()` HOT 3
- Malformed HTML parsed differently from browsers
- Make element traversal more convenient HOT 2
- [Feature Request] Find by Text HOT 1
- Dom Nodes closes prematurely on recursion HOT 4
- How to select contains and start with? HOT 1
- any way to scrape in a stream? HOT 2
- Support for `:has()` selector HOT 8
- Implement Send for ElementRef HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.