pulse-downloader 0.1.29 → 0.1.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -3
- data/Gemfile.lock +17 -17
- data/lib/pulse/downloader/client.rb +7 -4
- data/lib/pulse/downloader/version.rb +1 -1
- data/lib/pulse/downloader/web_page_parser.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: ea8f7f1cba1f575af4fb82c8d83d7108decbdc8eabf38be38693b2f94c5d4b95
|
4
|
+
data.tar.gz: 69deb413bdce72404ca9a76e5d5d01014214559c71a1aad421c8b3e32c400f52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f1633832d05cf665d116cd9180c66b02d7c0a0c5dbf77db03d758fa9f0f051982761125cbdfc4914e3dd53b5ee6c91fc9b74fe16cd9c992098e7f72df78ac52
|
7
|
+
data.tar.gz: 4f571acd0d6019506a9cb58b5e86bcb8c79cbc856406342a1325864ee6f771b7c3bdc09e65d8bba6ee79d1d77b59f4a37b5e771e6b8b51d959350d32142bf378
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pulse-downloader (0.1.
|
4
|
+
pulse-downloader (0.1.31)
|
5
5
|
active_attr (~> 0.15)
|
6
6
|
httparty (~> 0.18)
|
7
7
|
nokogiri (~> 1.11)
|
@@ -10,15 +10,15 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actionpack (6.1.
|
14
|
-
actionview (= 6.1.
|
15
|
-
activesupport (= 6.1.
|
13
|
+
actionpack (6.1.4.1)
|
14
|
+
actionview (= 6.1.4.1)
|
15
|
+
activesupport (= 6.1.4.1)
|
16
16
|
rack (~> 2.0, >= 2.0.9)
|
17
17
|
rack-test (>= 0.6.3)
|
18
18
|
rails-dom-testing (~> 2.0)
|
19
19
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
20
|
-
actionview (6.1.
|
21
|
-
activesupport (= 6.1.
|
20
|
+
actionview (6.1.4.1)
|
21
|
+
activesupport (= 6.1.4.1)
|
22
22
|
builder (~> 3.1)
|
23
23
|
erubi (~> 1.4)
|
24
24
|
rails-dom-testing (~> 2.0)
|
@@ -27,20 +27,20 @@ GEM
|
|
27
27
|
actionpack (>= 3.0.2, < 7.0)
|
28
28
|
activemodel (>= 3.0.2, < 7.0)
|
29
29
|
activesupport (>= 3.0.2, < 7.0)
|
30
|
-
activemodel (6.1.
|
31
|
-
activesupport (= 6.1.
|
32
|
-
activesupport (6.1.
|
30
|
+
activemodel (6.1.4.1)
|
31
|
+
activesupport (= 6.1.4.1)
|
32
|
+
activesupport (6.1.4.1)
|
33
33
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
34
34
|
i18n (>= 1.6, < 2)
|
35
35
|
minitest (>= 5.1)
|
36
36
|
tzinfo (~> 2.0)
|
37
37
|
zeitwerk (~> 2.3)
|
38
|
-
addressable (2.
|
38
|
+
addressable (2.8.0)
|
39
39
|
public_suffix (>= 2.0.2, < 5.0)
|
40
40
|
ansi (1.5.0)
|
41
41
|
builder (3.2.4)
|
42
42
|
coderay (1.1.3)
|
43
|
-
concurrent-ruby (1.1.
|
43
|
+
concurrent-ruby (1.1.9)
|
44
44
|
crack (0.4.5)
|
45
45
|
rexml
|
46
46
|
crass (1.0.6)
|
@@ -52,13 +52,13 @@ GEM
|
|
52
52
|
multi_xml (>= 0.5.2)
|
53
53
|
i18n (1.8.10)
|
54
54
|
concurrent-ruby (~> 1.0)
|
55
|
-
loofah (2.
|
55
|
+
loofah (2.12.0)
|
56
56
|
crass (~> 1.0.2)
|
57
57
|
nokogiri (>= 1.5.9)
|
58
58
|
method_source (1.0.0)
|
59
59
|
mime-types (3.3.1)
|
60
60
|
mime-types-data (~> 3.2015)
|
61
|
-
mime-types-data (3.2021.
|
61
|
+
mime-types-data (3.2021.0901)
|
62
62
|
minitest (5.14.4)
|
63
63
|
minitest-focus (1.1.2)
|
64
64
|
minitest (>= 4, < 6)
|
@@ -69,7 +69,7 @@ GEM
|
|
69
69
|
ruby-progressbar
|
70
70
|
mocha (1.11.2)
|
71
71
|
multi_xml (0.6.0)
|
72
|
-
nokogiri (1.
|
72
|
+
nokogiri (1.12.4-x86_64-linux)
|
73
73
|
racc (~> 1.4)
|
74
74
|
options (2.3.2)
|
75
75
|
progress_bar (1.3.3)
|
@@ -86,9 +86,9 @@ GEM
|
|
86
86
|
rails-dom-testing (2.0.3)
|
87
87
|
activesupport (>= 4.2.0)
|
88
88
|
nokogiri (>= 1.6)
|
89
|
-
rails-html-sanitizer (1.
|
89
|
+
rails-html-sanitizer (1.4.2)
|
90
90
|
loofah (~> 2.3)
|
91
|
-
rake (
|
91
|
+
rake (13.0.6)
|
92
92
|
rexml (3.2.5)
|
93
93
|
ruby-progressbar (1.11.0)
|
94
94
|
timecop (0.9.4)
|
@@ -111,7 +111,7 @@ DEPENDENCIES
|
|
111
111
|
mocha (~> 1.11.2)
|
112
112
|
pry (~> 0.13)
|
113
113
|
pulse-downloader!
|
114
|
-
rake (~>
|
114
|
+
rake (~> 13.0)
|
115
115
|
timecop (~> 0.9.1)
|
116
116
|
webmock (~> 3.8.3)
|
117
117
|
|
@@ -20,7 +20,8 @@ module Pulse
|
|
20
20
|
:start_time,
|
21
21
|
:end_time,
|
22
22
|
:progress_bar,
|
23
|
-
:base_url
|
23
|
+
:base_url,
|
24
|
+
:file_paths
|
24
25
|
|
25
26
|
# Does not continue downloads-
|
26
27
|
# Will only save once the file has been downloaded in memory
|
@@ -66,12 +67,14 @@ module Pulse
|
|
66
67
|
def call
|
67
68
|
return false unless valid?
|
68
69
|
|
70
|
+
@file_paths = fetch_file_paths
|
71
|
+
|
69
72
|
if @progress_bar
|
70
|
-
@progress_bar = ::ProgressBar.new(
|
73
|
+
@progress_bar = ::ProgressBar.new(file_paths.size)
|
71
74
|
end
|
72
75
|
|
73
|
-
|
74
|
-
download(file_path, @progress_bar)
|
76
|
+
file_paths.map do |file_path|
|
77
|
+
download(file_path, @progress_bar) if save_data
|
75
78
|
@progress_bar.increment!
|
76
79
|
end
|
77
80
|
end
|
@@ -26,7 +26,7 @@ module Pulse
|
|
26
26
|
def extract_file_urls(response, custom_path_root, type)
|
27
27
|
return [] if response.body.nil? || response.body.empty?
|
28
28
|
|
29
|
-
|
29
|
+
remove_artefacts(
|
30
30
|
extract_all_urls(response, custom_path_root, type) +
|
31
31
|
extract_download_links(response, type) +
|
32
32
|
extract_embedded_images(response, type)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pulse-downloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- trex22
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|