art_paintings_extractor 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/art_paintings_extractor/version.rb +1 -1
- data/run_extractor.rb +3 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 395465129725160cb86c033ddd969b31f4f4c053bbfbbc97aee6cb40029e958f
|
4
|
+
data.tar.gz: f5acff0f29b987ed23fa16865aea46bc1edfe6462db815ace7545b52bcf1138a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fde92228c7fd05d13958838e0b1090f0e9e5d8362f2cb588a186619950d3f83bbefd6284e9549c7d83dfb73643381a3e983f08b5a63c471a737d33f323ab7f7
|
7
|
+
data.tar.gz: ae31e4b540c7da3a8677b80c2cb49701530fc0191a2bb62b70bedd256b7ba8f707cc61b90895e70be5dd9e2c32dd160bf7e7982af4f2e440234cfd7e4c02b102
|
data/run_extractor.rb
CHANGED
@@ -1,19 +1,10 @@
|
|
1
|
-
|
1
|
+
require 'nokogiri'
|
2
2
|
|
3
|
-
require_relative "lib/
|
3
|
+
require_relative "lib/art_paintings"
|
4
4
|
|
5
|
-
# Path to the HTML file you want to parse
|
6
5
|
html_file = "./files/van-gogh-paintings.html"
|
7
6
|
|
8
|
-
# Output JSON file
|
9
|
-
# output_file = 'files/extracted_paintings.json'
|
10
|
-
|
11
|
-
# Create an instance of the extractor
|
12
7
|
extractor = ArtPaintingsExtractor::ArtPaintings.new(html_file)
|
13
8
|
|
14
|
-
# Extract paintings and print them
|
15
9
|
paintings = extractor.extract_paintings
|
16
|
-
puts paintings
|
17
|
-
|
18
|
-
# Save paintings to a JSON file
|
19
|
-
# extractor.save_to_file(output_file)
|
10
|
+
puts paintings
|