epub_book 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/epub_book/book.rb +2 -1
- data/lib/epub_book/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0735c9b7e26babca4b2f7fa802ecdfe0b7d4a28a
|
4
|
+
data.tar.gz: 10a55f1dd0faf6eb2c40496170f615eb4ab85604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c460cc949d519dfd0cf44e366ad724710cc0da94e84dcff8350d6b72c9a5bd3659a17f72891e4fd605cabfce44d7a75758169889076d7881758bb6bd68feabe
|
7
|
+
data.tar.gz: ebf8039702739dd2d45ec763179d856c982ce67f89efa4cbe24ab68d3d9c2d82132d884c24ecfec5340e5bef5530a92e04fc69bf1bf3027352d26fd43b5a870f
|
data/lib/epub_book/book.rb
CHANGED
@@ -32,7 +32,7 @@ module EpubBook
|
|
32
32
|
@des_url = des_url
|
33
33
|
@user_agent = UserAgent
|
34
34
|
@referer = Referer
|
35
|
-
@folder_name = Base64.urlsafe_encode64(
|
35
|
+
@folder_name = Base64.urlsafe_encode64(Digest::MD5.digest(@index_url))[0..-2]
|
36
36
|
@creator = 'javy_liu'
|
37
37
|
@title_css = '.wrapper h1.title1'
|
38
38
|
@index_item_css = 'ul.list3>li>a'
|
@@ -127,6 +127,7 @@ module EpubBook
|
|
127
127
|
|
128
128
|
doc.css(@index_item_css).each do |item|
|
129
129
|
_href = URI.encode(item.attr(@item_attr).to_s)
|
130
|
+
next if _href.start_with?('javascript')
|
130
131
|
_href = link_host + _href unless _href.start_with?("http")
|
131
132
|
book[:files] << {label: item.text, url: _href}
|
132
133
|
end
|
data/lib/epub_book/version.rb
CHANGED