stylemooncat 0.0.7 → 0.0.8

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: 37605c582c4d3a6f49efc9a54d55c85a477d82d4
4
- data.tar.gz: a9c7415659c0a44728be90e95b5fc1d18a3ad50b
3
+ metadata.gz: d22a25a0df1771109c5519e3bd76209381878a77
4
+ data.tar.gz: 21b0f00b49821cf758437aacdff9af2121663b9c
5
5
  SHA512:
6
- metadata.gz: 0d9b67cb94c808f8109e4aafa78906137b91dfda2ecc4da2bf7067c47a5cb992d71867e6e79d62c4bf720eacff7f3fcdd962061c99bb8c4a8364db67d6a0cedb
7
- data.tar.gz: 56d7d6788c4a08e0bf6bec75c63f1863ccf575624f0c815a915242c3e52e883b48e97d02ecfb952477357ad6c2cbaccbd805851f0c37322c22394841c1610999
6
+ metadata.gz: ac9206c21e680963f0fa251a499c776f47715668953ba428c8d8071d05c39091a1771edbd8e3f25914fe130c921f13b4e99bcac5544a226e601b86eacf32bc5f
7
+ data.tar.gz: c532ddf1a5d9a03be1e73e22ec1190a87a56853413d6ce63e7a96fe13d567426a0a0190d89cc4b4bf4a98bee0c8e672344902a67a386ffb48be51e0cb9229de5
data/bin/stylemooncat CHANGED
@@ -3,5 +3,16 @@
3
3
  require_relative '../lib/stylemooncat.rb'
4
4
 
5
5
  @scraper = StyleMoonCat::Scraper.new
6
- puts @scraper.scrape(ARGV[0],ARGV[1],ARGV[2],ARGV[3],ARGV[4])
6
+ options ={}
7
+ options[:page_limit]=ARGV[1]
8
+
9
+ price_boundary=[]
10
+ price_boundary.push(ARGV[3])
11
+ price_boundary.push(ARGV[4])
12
+
13
+ options[:keyword]=ARGV[2]
14
+ options[:price_boundary]=price_boundary
15
+
16
+ #puts @scraper.scrape(ARGV[0],ARGV[1],ARGV[2],ARGV[3],ARGV[4],ARGV[5])
17
+ puts @scraper.scrape(ARGV[0],options)
7
18
  #puts @scraper.scrape("shoes",{:keyword=>"none",:page_limit=>3,:price_boundary=>[0,600]})
@@ -106,7 +106,7 @@ module StyleMoonCat
106
106
  end
107
107
  @filter_results=[]
108
108
  @count=1
109
- 1.upto(page_limit) do
109
+ 1.upto(page_limit.to_i) do
110
110
  page = @count
111
111
  case category
112
112
  when "newarrival"
@@ -265,7 +265,9 @@ module StyleMoonCat
265
265
  end
266
266
 
267
267
  def extract_images(item)
268
- item.xpath(@@IMAGE_XPATH).attribute(:src).first.value
268
+ result=[]
269
+ result.push(item.xpath(@@IMAGE_XPATH).attribute(:src).first.value)
270
+
269
271
  end
270
272
 
271
273
  def extract_link(item)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stylemooncat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Even Chang