snapcrawl 0.4.3 → 0.4.4
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/README.md +1 -1
- data/lib/snapcrawl/crawler.rb +13 -3
- data/lib/snapcrawl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 99d66eca6d9f9ef3b952591ab2ca355094cd0dcea07669ae76474693d5b4caf4
|
|
4
|
+
data.tar.gz: 04b4d1a41d8e3b550519f87c9f837ef5ad0ff5b9af7528e317a1dd0943326e12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07bb6174d3681559d18cb73ca3c7b18f37c60a13f483ccab530b31845db7019f2413680e4e61907cadf8aeccdf6343bee484bafd444c321978de279ca3bbcda6
|
|
7
|
+
data.tar.gz: 70bbb5cf8508417b5a98c3af830efb8251cc7216c73ef66b1c31495d573e8289d1b1662779305ff42a6aaafedb7f621ba7942b6b469f17c6513617e98dbe8432
|
data/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Snapcrawl - crawl a website and take screenshots
|
|
2
2
|
==================================================
|
|
3
3
|
|
|
4
|
-
[](https://travis-ci.com/DannyBen/snapcrawl)
|
|
5
4
|
[](http://badge.fury.io/rb/snapcrawl)
|
|
5
|
+
[](https://github.com/DannyBen/snapcrawl/actions?query=workflow%3ATest)
|
|
6
6
|
[](https://codeclimate.com/github/DannyBen/snapcrawl)
|
|
7
7
|
|
|
8
8
|
---
|
data/lib/snapcrawl/crawler.rb
CHANGED
|
@@ -99,6 +99,18 @@ module Snapcrawl
|
|
|
99
99
|
fetch_opts[:full] = false
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
+
webshot_capture url, image_path, fetch_opts
|
|
103
|
+
say "done"
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def webshot_capture(url, image_path, fetch_opts)
|
|
107
|
+
webshot_capture! url, image_path, fetch_opts
|
|
108
|
+
rescue => e
|
|
109
|
+
say "!txtred!FAILED"
|
|
110
|
+
say "!txtred! ! #{e.class}: #{e.message.strip}"
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def webshot_capture!(url, image_path, fetch_opts)
|
|
102
114
|
hide_output do
|
|
103
115
|
webshot.capture url, image_path, fetch_opts do |magick|
|
|
104
116
|
magick.combine_options do |c|
|
|
@@ -108,9 +120,7 @@ module Snapcrawl
|
|
|
108
120
|
c.extent @opts.height > 0 ? "#{@opts.width}x#{@opts.height}" : "#{@opts.width}x"
|
|
109
121
|
end
|
|
110
122
|
end
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
say "done"
|
|
123
|
+
end
|
|
114
124
|
end
|
|
115
125
|
|
|
116
126
|
def extract_urls_from(url)
|
data/lib/snapcrawl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: snapcrawl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Danny Ben Shitrit
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colsole
|