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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd8a0433b5b28cbafc6bdd278240eebf5bff4a80
4
- data.tar.gz: 64228d14dee44467a4e4f9bbbaeb00c9b708596d
3
+ metadata.gz: 0735c9b7e26babca4b2f7fa802ecdfe0b7d4a28a
4
+ data.tar.gz: 10a55f1dd0faf6eb2c40496170f615eb4ab85604
5
5
  SHA512:
6
- metadata.gz: 92d7dc626ff49c8bb275de0559025d23c77374cc8c17887e4b08da219f5500b4d59e015965edb0ac86ee3779ef6f356550a42b323c78e771981d0e628e19fbfb
7
- data.tar.gz: 6f2db1d7ba8edd0a12c73bb7ef8e02e7897cec35b1af5f2a858456f7c602d1bc97d8d9e85bb67fe5c68cc73f7c0480cfd91ee0c225f060c4226157da143dca07
6
+ metadata.gz: 9c460cc949d519dfd0cf44e366ad724710cc0da94e84dcff8350d6b72c9a5bd3659a17f72891e4fd605cabfce44d7a75758169889076d7881758bb6bd68feabe
7
+ data.tar.gz: ebf8039702739dd2d45ec763179d856c982ce67f89efa4cbe24ab68d3d9c2d82132d884c24ecfec5340e5bef5530a92e04fc69bf1bf3027352d26fd43b5a870f
@@ -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(Array(index_url).pack('P'))[0..-2]
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
@@ -1,3 +1,3 @@
1
1
  module EpubBook
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epub_book
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - qmliu