TaoBaoApi 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -38,4 +38,7 @@ p info #hash format,{:title => xxx, :price => xxx, :images => [], :url => url}
38
38
  测试文件见test.rb
39
39
 
40
40
  ## Todo
41
- * 获取促销价
41
+ * 获取促销价
42
+
43
+ ## update list
44
+ * 改进价格获取失败的问题;
data/lib/TaoBaoApi.rb CHANGED
@@ -93,6 +93,8 @@ module TaoBaoApi
93
93
  #格式化16.0 - 18.0 类似这样的价格区间
94
94
  def price_filter price
95
95
  price = price.split('-').first.strip if !price.nil? && price.include?('-')
96
+
97
+ price
96
98
  end
97
99
 
98
100
  end
@@ -1,3 +1,3 @@
1
1
  module TaoBaoApi
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/test.rb CHANGED
@@ -1,11 +1,11 @@
1
1
  require File.join(File.dirname(__FILE__), 'lib', 'TaoBaoApi')
2
2
 
3
- url = 'http://item.taobao.com/item.htm?id=16434110195'
3
+ # url = 'http://item.taobao.com/item.htm?id=16434110195'
4
4
  # url = 'http://detail.tmall.com/item.htm?id=35513218520'
5
5
  # url = 'http://item.taobao.com/item.htm?spm=a1z09.5.0.0.x2gUPA&id=16718391999'
6
6
  # url = 'http://item.taobao.com/item.htm?id=20132398689'
7
7
  # url ='http://detail.tmall.com/item.htm?id=9153380600'
8
- # url ='http://detail.tmall.com/item.htm?id=17350703554&spm=a1z09.5.0.0.PCBxNl'
8
+ url ='http://detail.tmall.com/item.htm?id=17350703554&spm=a1z09.5.0.0.PCBxNl'
9
9
  good = TaoBaoApi::Good.new url
10
10
 
11
11
  info = good.get_info
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TaoBaoApi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-28 00:00:00.000000000 Z
12
+ date: 2014-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler