pulse-downloader 0.1.25 → 0.1.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48153054f979c1f1ed2e36c211edb598f921b41e6f5e0b71bfd8368eaa4112f3
4
- data.tar.gz: 1c831b86a9ead79b51446ed0b911ee54d3b410437d20214fddb57da808a3938a
3
+ metadata.gz: b59437d8b4d75cbb7c68010644dbb046f6860e9c37187aefad578e4316111e82
4
+ data.tar.gz: fcc8cd9883129f60bd427c51c3420b7176a3347a0f8f87939669f7cf82d78966
5
5
  SHA512:
6
- metadata.gz: f0a0e5d9dbeca80d2de42ae1e655191e9aa01c557992b141412cd1dfe86751b3e047b951fc2f6bbf28ea487b7bc8f80d1d173d76c129ca38194cda34f894ef7a
7
- data.tar.gz: cf2a9d907e5f35a792c4d9b7f89ea0e0a96b50de499ade69b62afe0108857a7324836021b3ba338d22c05744789b8e252db08a1ae36177f3a5f671003bee6a32
6
+ metadata.gz: 81611fe51bce4a86cbeccb01362eaf8b1e8e3cc9a618b92206c46cc3afb875779e92962c18582b19df593941f68bac9726f7854902fb811ef97e2edabbd682f4
7
+ data.tar.gz: 916859633e6ac45c882e5c3ebce09834f4e1f0318fc3eba927549bea54be0f714255fb41f0c5b715f9a4a051a1219aeed7b89ddbc2b14600d0f98c3d79e6947b
data/README.md CHANGED
@@ -33,7 +33,8 @@ client = Pulse::Downloader::Client.new(
33
33
  drop_exitsing_files_in_path: false,
34
34
  save_and_dont_return: true,
35
35
  report_time: false,
36
- progress_bar: true
36
+ progress_bar: true,
37
+ scrape_images: true
37
38
  )
38
39
 
39
40
  client.call!
@@ -1,5 +1,5 @@
1
1
  module Pulse
2
2
  module Downloader
3
- VERSION = "0.1.25"
3
+ VERSION = "0.1.26"
4
4
  end
5
5
  end
@@ -25,7 +25,7 @@ module Pulse
25
25
 
26
26
  def extract_file_urls(response, custom_path_root, type)
27
27
  return [] if response.body.nil? || response.body.empty?
28
- (
28
+ remove_base64(
29
29
  extract_all_urls(response, custom_path_root, type) +
30
30
  extract_download_links(response, custom_path_root, type) +
31
31
  extract_embedded_images(response, custom_path_root, type)
@@ -64,6 +64,12 @@ module Pulse
64
64
  .map { |link| add_base_url(link) }
65
65
  end
66
66
 
67
+ def remove_base64(urls)
68
+ urls.reject do |url|
69
+ url.include?(':image/') || url.include?('base64')
70
+ end
71
+ end
72
+
67
73
  def parse_html(raw_html)
68
74
  Nokogiri::HTML(raw_html)
69
75
  end
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.25
4
+ version: 0.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - trex22
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-10 00:00:00.000000000 Z
11
+ date: 2021-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty