javlibrary 0.2.4 → 0.2.5

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
  SHA1:
3
- metadata.gz: 4d6b5d9c8c1fb783c9d2266e7d5cd88987327c3d
4
- data.tar.gz: 350c7e881e3fcdc002a48de3e49beca27f512da4
3
+ metadata.gz: b6b0d7a17a538195d57a811e3885e93cf313f245
4
+ data.tar.gz: 87a8dfd5ecadc55dadbbf1a672eb3a3649a387ec
5
5
  SHA512:
6
- metadata.gz: 7008b371894ff635b49deb8a05b1958418d82d22fca96bbfbec2138896e88626921285bedf60c09560e6194acb12902e1dc8b7208176c74ea3a2012b094ab00f
7
- data.tar.gz: 9eff3d1ac36bd31e47d1a07a033a1fb21d97222b9ba613312595a765f3b5ae0db9f6cb5ed28c23c8ffaebf2a89435f0aea60a02a7fa56062283ef8f70eece1e3
6
+ metadata.gz: fd942a1110d658621e77bfea1948a6935808735217a4d1fe28f0faba0c0c689a044e906304665c7e79fe84a4994895c2ea87d77ffbaa485cd85024d381a69da9
7
+ data.tar.gz: 10c09754ae04e751baf1d800fcee7b0b5e1123c4e852d984708a83e4cf3ab62f32bd3423b2fc1cfbf57525a79fc84cbbdcc28d57acd448431194a1d1e12f8f3d
@@ -20,7 +20,7 @@ class JavlibrarySpider
20
20
  @url = JAVLIBRARY_URL[0]
21
21
  end
22
22
 
23
- def client
23
+ def client()
24
24
  client = Mysql2::Client.new(:host => "127.0.0.1",
25
25
  :username => @user,
26
26
  :password => @password,
@@ -91,7 +91,7 @@ class JavlibrarySpider
91
91
  end
92
92
 
93
93
  def download_all_videos
94
- client = client
94
+ client = client()
95
95
  result = client.query("SELECT video_num, video_label FROM label WHERE video_download=0")
96
96
  client.close
97
97
 
@@ -127,7 +127,7 @@ class JavlibrarySpider
127
127
  end
128
128
 
129
129
  def actor_hash
130
- client = client
130
+ client = client()
131
131
  actor_hash = Hash.new
132
132
  client.query("SELECT * FROM actor").each do |item|
133
133
  actor_hash["#{item['actor_name']}"] = item['actor_id']
@@ -163,7 +163,7 @@ class JavlibrarySpider
163
163
  end
164
164
 
165
165
  def genres_insert
166
- client = client
166
+ client = client()
167
167
  genres = genres()
168
168
  genres.each do |e|
169
169
  begin
@@ -189,7 +189,7 @@ class JavlibrarySpider
189
189
  def get_all_actor
190
190
  firsturl = "http://www.#{@url}/cn/star_list.php?prefix="
191
191
 
192
- client = client
192
+ client = client()
193
193
  'A'.upto('Z') do |alphabet|
194
194
  tempurl = firsturl + alphabet
195
195
  begin
@@ -263,7 +263,7 @@ class JavlibrarySpider
263
263
  end
264
264
  end
265
265
 
266
- client = client
266
+ client = client()
267
267
  result.each do |e|
268
268
  begin
269
269
  client.query("INSERT INTO label (video_label, video_download) VALUES ('#{e}', '0')")
@@ -275,7 +275,7 @@ class JavlibrarySpider
275
275
  end
276
276
 
277
277
  def select_actor(type)
278
- client = client
278
+ client = client()
279
279
  result = client.query("SELECT actor_label FROM actor WHERE type='#{type}'")
280
280
  client.close
281
281
 
@@ -1,3 +1,3 @@
1
1
  module Javlibrary
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: javlibrary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuanhao Sun