wikihow 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9ddfdd1a9076593a482625840ecb771a52fc2a5e087de6d5f4c214334aee9ae
4
- data.tar.gz: 525467dc49b64bb6a42a45240aa072934378a9499241ccac780e8016f2e351fe
3
+ metadata.gz: 774a464dc8a9b350e69b0f494c4336d7338c3b1579834ed1f998ff418b37da36
4
+ data.tar.gz: 60f803ea92cf5827a9a12e398efbbe34004a2e4bf540ad44858b6963f90a4ca9
5
5
  SHA512:
6
- metadata.gz: 68cd4e28703925cef8b23db2a12628aa2d652ac76cf1298c16e70dc33d28e0b1c1e80927583a4642409d580662a63948708a017e198854e3b01c698005ace4a1
7
- data.tar.gz: 0a47cb859671095a0befc78e077cb88fcc203958d32bd523af0545246441d897673a87013944507e448b762652fc52a90169fd1eb6e2910db18df66557baa449
6
+ metadata.gz: 496aa3da5b3fa5dab5c0ec153f1f16267c8850d026a211e06e1ea57c7fb561063affbb52b3fad5486105a31542f5fb6fa254f52fb4de588479766bfbc92b3dfe
7
+ data.tar.gz: 4f4edeaf6f8baf2b21e4fc098ae1bfd79d6457361020099c62f98d245d38d616009d037114f9a760b77418def13814f1bbaf21fa30f11fd2de63c4781784ffef
@@ -31,7 +31,7 @@ class Wikihow::Scraper
31
31
  end
32
32
 
33
33
  sections_array.each.with_index do |section, i|
34
- doc.search(".steps_list_2")[i].search(".step").each do |section_li|
34
+ doc.search(".steps")[i].search(".step").each do |section_li|
35
35
  step_description = [section_li.search(".whb").text.strip + " " + section_li.search("> text()").text.strip]
36
36
  section_li.search("> ul > li").each do |step_li|
37
37
  bullet_point = [step_li.search("> text(), a").text.strip]
@@ -41,6 +41,10 @@ class Wikihow::Scraper
41
41
  end
42
42
  section[:section_steps] << step_description
43
43
  end
44
+
45
+ if doc.search(".steps")[i].search(".step").empty?
46
+ section[:section_steps] << ["There is no text description for this section"]
47
+ end
44
48
  end
45
49
  sections_array
46
50
  end
@@ -1,3 +1,3 @@
1
1
  module Wikihow
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikihow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'Jared Grove'"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-17 00:00:00.000000000 Z
11
+ date: 2019-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler