Changelog History
-
v0.4.0-alpha Changes
April 18, 2019๐ News
- ๐ New parsing engine #12 (thanks to @giuseongit )
- Extends
Crystagiri::Tag
API #13 (thanks to @giuseongit )
-
v0.3.5 Changes
April 12, 2019๐ News:
- โ Add possibilty to follow redirect link #11 (thanks to @giuseongit )
-
v0.3.4 Changes
November 28, 2018- ๐ Make block return #5
-
v0.3.2 Changes
December 09, 2016Correction
- correct impossibility to found a node who contains a number in its classname
-
v0.3.1 Changes
December 09, 2016Correction
- correct impossibility to found a node who contains a number in its classname
-
v0.3.0 Changes
December 09, 2016feature
- โ Add anew
Crystagiri::Tag
class who include aXML::Node
variable and add more usefull method - add a benchmark between Crystagiri & Nokogiri
- โ Add anew
-
v0.2.1 Changes
December 09, 2016Corrections
- ๐ Rename
Crystagiri::HTML.class
method asCrystagiri::HTML.where_class
. - To be more logic, I renamed also
Crystagiri::HTML.tag
intoCrystagiri::HTML.where_tag
- Correct a bug when user search only a class with
Crystagiri::HTML.css
- ๐ Rename
-
v0.2.0 Changes
December 09, 2016new feature
Implement css query
doc.css("#main-content ol.steps") {|node| puts node}# => <ol class="steps"> .. </ol>doc.css("#body>quote.introduction") {|node| puts node}# => <quote class="introduction"> .. </quote>
-
v0.1.0 Changes
December 09, 2016Initial release
๐ In this first version you can only parse Html file represented by
Crystagiri::HTML
. You can instanciate it from :doc = Crystagiri::HTML.new "\<h1\>Crystagiri is awesome!!\</h1\>"doc = Crystagiri::HTML.from\_file "README.md"doc = Crystagiri::HTML.from\_url "http://example.com/"
Then you can search all
XML::Node
by:HTML tag
doc.tag("h2") { |node| puts node }# => <h2> .. </h2># => <h2> .. </h2># => <h2> .. </h2>
HTML id
puts doc.at_id("main-content") # => <div id="main-content"> ... </div>
HTML class attribute
doc.class("summary") { |node| puts node }# => <div class="summary"> .. </div># => <div class="summary"> .. </div># => <div class="summary"> .. </div>