pulse-downloader 0.1.17 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pulse/downloader/version.rb +1 -1
- data/lib/pulse/downloader/web_page_parser.rb +8 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00f53bf497e8c65d6211956814fa94613857b23bc0b1e3f35c24d69998645941
|
4
|
+
data.tar.gz: 77447e1a3b1df593d5c836074c41e6caa57fef28f8926a5f7e1859fb1b58b39d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 627db0d3d117a199943ba7ade0c27af871f4934e6879bb788fcade5946b95bfa0378d237fb5eee0f68685cf211b042a3b35986441466b0d6811875fe7103304f
|
7
|
+
data.tar.gz: 1f7c99a75487b6c615cb94bd8def2ed1f5316036339318244329648be8800dc5ab867a8022e956e1a46ac0e0cb58f4502030453c7efadd7131d7edbb69a5a538
|
@@ -19,7 +19,9 @@ module Pulse
|
|
19
19
|
|
20
20
|
def extract_file_urls(response)
|
21
21
|
return [] if response.body.nil? || response.body.empty?
|
22
|
-
|
22
|
+
(
|
23
|
+
extract_download_links(response) + extract_embedded_images(response)
|
24
|
+
).uniq
|
23
25
|
end
|
24
26
|
|
25
27
|
def extract_download_links(response)
|
@@ -49,7 +51,11 @@ module Pulse
|
|
49
51
|
end
|
50
52
|
|
51
53
|
def add_base_url(str)
|
52
|
-
|
54
|
+
if !str.include?('https://') && !str.include?(base_url)
|
55
|
+
"https://#{base_url}#{str}"
|
56
|
+
else
|
57
|
+
str
|
58
|
+
end
|
53
59
|
end
|
54
60
|
end
|
55
61
|
end
|