rakuten_securities_scraper 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4597241d08e13fa2afc21854b6bef9a2948633244b7fd19355f55e63a891fc7d
4
- data.tar.gz: 3ff338627402785d5d992f3de6eb8356306b956e2958cdf3afe5498e43cb4e0b
3
+ metadata.gz: 6bda3af5dc3b21c8c6ec54d33c5893400f7164df75a7eeaf6ab768ce314e0ade
4
+ data.tar.gz: 2c21e09bc510161f97ee42fb144545cafa9d630f647cdfb945c057049cf9851d
5
5
  SHA512:
6
- metadata.gz: bfbc83f71accbf4fd07eb0aefb4665fe937d41780e7a8491f227424431f026d96e6c4c1da78363a5d1418cbe09fa3ab489fc6c6b6e0a402cfeeaaad0dbc7a043
7
- data.tar.gz: 061317f5fe6878f06b43b1fe6988ec63cd95457cefa447568479fdf68d794f8e4ebf87ce20d71913806d609766a4b5f4e44b547548720daea3488d2ede437942
6
+ metadata.gz: be780e7e99a503791fb907e0d006b2923c6958827a12e6e33abbff08d79199a2ba7c01865c02f4c1a3620a8af155989b2df8e54488c60d666410e9d96a18f817
7
+ data.tar.gz: 95d8916aea0f264a536fefbc5349c83d7f34fb9d5bb114907ca4eed3557a829367204b14f5cb08573b0637ee62b41ee45dfc272420ff1b9e110d7f96d46e1f3d
data/.rubocop.yml CHANGED
@@ -216,4 +216,10 @@ Style/SafeNavigation:
216
216
  Enabled: false
217
217
 
218
218
  Lint/NumberConversion:
219
+ Enabled: false
220
+ Style/ConstantVisibility:
221
+ Enabled: false
222
+ Style/MutableConstant:
223
+ Enabled: false
224
+ Style/Copyright:
219
225
  Enabled: false
data/README.md CHANGED
@@ -9,7 +9,7 @@ TODO: Delete this and the text above, and describe your gem
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'rakuten_securities_scraper'
12
+ gem "rakuten_securities_scraper"
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -22,7 +22,18 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ ruby```
26
+ include RakutenSecuritiesScraper
27
+ data = RakutenScraper.new($LOGIN_ID, $LOGIN_PW)
28
+
29
+
30
+ ## Get Today's Trade History
31
+ data.todays_history
32
+
33
+ ## Get All Trade History
34
+ data.all_history
35
+
36
+ ```
26
37
 
27
38
  ## Development
28
39
 
@@ -32,5 +43,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
43
 
33
44
  ## Contributing
34
45
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rakuten_securities_scraper.
46
+ Bug reports and pull requests are welcome on GitHub at https://github.com/elsoul/rakuten_securities_scraper.
36
47
 
@@ -1,4 +1,5 @@
1
1
  require "rakuten_securities_scraper/version"
2
+ require "selenium-webdriver"
2
3
 
3
4
  module RakutenSecuritiesScraper
4
5
  class Error < StandardError; end
@@ -32,6 +33,8 @@ module RakutenSecuritiesScraper
32
33
  rows = driver.find_elements(xpath: "//tr")
33
34
  page_num = rows[8].text.scan(/(.+)件中/)[0][0].to_i
34
35
  trade_table_data driver, page_num
36
+ ensure
37
+ driver.quit
35
38
  end
36
39
 
37
40
  def todays_history
@@ -56,6 +59,8 @@ module RakutenSecuritiesScraper
56
59
  return "no data"
57
60
  end
58
61
  trade_table_data driver, page_num
62
+ ensure
63
+ driver.quit
59
64
  end
60
65
 
61
66
  def trade_table_data driver, page_num
@@ -1,3 +1,3 @@
1
1
  module RakutenSecuritiesScraper
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rakuten_securities_scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - FUMI-POPPIN