bbc10 1.0.1 → 1.0.2
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 +4 -4
- data/bin/bbc10 +1 -1
- data/lib/bbc10/scraper.rb +6 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18db3f0b43193de18db66070e6a49f80234356185f2497a6728d540d620443fc
|
4
|
+
data.tar.gz: ed6989ae595bee17b7b99a2996735437e37153f88d7ab47b3f2820d2487ba051
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed0ff1ce72780a64d5afea4204797f2d6b9f89902bcbe213b1bd133f67c1e179dc4991b6609f11d270350a25a98df20095d099174dfafaac573fc5f4e6fd35a1
|
7
|
+
data.tar.gz: 72a7e930fcbffd72876d19c94867c961b4a30548b61f82abde7438c24b23290e07f196e24e36b552487641e0fe642d9f3b90f090be34f01823f68540c90b9789
|
data/bin/bbc10
CHANGED
data/lib/bbc10/scraper.rb
CHANGED
@@ -14,7 +14,12 @@ module Bbc10
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.scrape_story(story)
|
17
|
-
story.css('.story-body__inner p').map(&:content)
|
17
|
+
article = story.css('.story-body__inner p').map(&:content)
|
18
|
+
if article.empty?
|
19
|
+
puts "\nFailed to scrape - use link above\n\n"
|
20
|
+
else
|
21
|
+
article.each{|para| puts "#{para}\n\n"}
|
22
|
+
end
|
18
23
|
end
|
19
24
|
end
|
20
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbc10
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- s33dco
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
## A scraper for the bbc news website.
|
@@ -36,7 +36,7 @@ homepage: https://github.com/s33dco/bbc10
|
|
36
36
|
licenses:
|
37
37
|
- MIT
|
38
38
|
metadata: {}
|
39
|
-
post_install_message: Thanks for installing ♥️
|
39
|
+
post_install_message: Thanks for installing ♥️ s33dco
|
40
40
|
rdoc_options: []
|
41
41
|
require_paths:
|
42
42
|
- lib
|