kindle_manager 0.2.0 → 0.2.1

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: 721e9464cf36e24c142310fc3fa442f8e1657907
4
- data.tar.gz: 54f92ba10006942948e6cf9fa7fb903f27410ca3
3
+ metadata.gz: 8f75d49be076b15b198be2b9390930a6a4f6889c
4
+ data.tar.gz: d1f21b28e5f365381d3c98d4535dd84fec7607bc
5
5
  SHA512:
6
- metadata.gz: 36193a8e16b78cedb82634dc7833ce1f374294f84a356eea3f11a36e0f6c054adad62eac6eac74b36946d54296c540ae62787febcd1d8ec6838124ef72af8980
7
- data.tar.gz: ba69e1b414fb5c745c04dd25846c4af2dadd4a78d8e6636b9daae879b7298469100445abbdd1b89a91b27c761220d5671dbe28a25f9e988ed8c9cf938e8382d8
6
+ metadata.gz: 461f4cc25344a6c9e542785a7060bb31926f9ec5198c77f64ec2cc59fc08513145a0b53690b77b555d49172d0b5973dd1e9ab20150d6f3315f42bac916ee513f
7
+ data.tar.gz: f0da08d5cfb721317433fd7722322d2a9dd05bcd0a8e187ba44fdbe7cf94c9a0ce139c14944a1b0a156161a4e3001e621a3f6396270bc6c84eb4567bf9888c7d
data/README.md CHANGED
@@ -76,12 +76,14 @@ Limit fetching with number of fetched books: `client = KindleManager::Client.new
76
76
 
77
77
  Change sleep duration on scrolling (default 3 seconds): `client = KindleManager::Client.new(fetching_interval: 5)`
78
78
 
79
- ##### Options of amazon_auth gem
80
-
81
- Chrome driver: `driver: :chrome`
79
+ Change max scroll attempts (default 20): `client = KindleManager::Client.new(max_scroll_attempts: 30)`
82
80
 
83
81
  Renew the directory for downloading: `create: true`
84
82
 
83
+ ##### Options of amazon_auth gem
84
+
85
+ Firefox: `driver: :firefox`
86
+
85
87
  Login and password: `login: 'xxx', password: 'yyy'`
86
88
 
87
89
  ## Applications
@@ -5,6 +5,7 @@ module KindleManager
5
5
  def initialize(options = {})
6
6
  @debug = options.fetch(:debug, false)
7
7
  @limit = options.fetch(:limit, nil)
8
+ @max_scroll_attempts = options.fetch(:max_scroll_attempts, 20)
8
9
  @options = options
9
10
  @client = AmazonAuth::Client.new(@options)
10
11
  extend(AmazonAuth::SessionExtension)
@@ -66,7 +67,7 @@ module KindleManager
66
67
  def load_next_kindle_list
67
68
  wait_for_selector('.contentCount_myx')
68
69
  @current_loop = 0
69
- while @current_loop <= 16 # max attempts
70
+ while @current_loop <= @max_scroll_attempts
70
71
  if @limit && @limit < number_of_fetched_books
71
72
  break
72
73
  elsif has_more_button?
@@ -1,3 +1,3 @@
1
1
  module KindleManager
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kindle_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuho Yamaguchi