amazon_wish_miner 0.1.4 → 0.1.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
  SHA256:
3
- metadata.gz: dc34b062b775ba5a0affb2f153989b2782cd1e29eca738841e15e983bfbb2eff
4
- data.tar.gz: 14a27724f668364aef570293e1696525d7b21345b199c79d945652f0db875641
3
+ metadata.gz: bcf84ae431879ecd4a8c58f1d3b35efda52a99e4f91147b5e502bfee9e5cd04c
4
+ data.tar.gz: 3a517c7ddfa90505ca13ba3bb18b0bdc4b6549911120836e955b0fe068181412
5
5
  SHA512:
6
- metadata.gz: e5d3e0a88285addb352a5d680c24231374a0013e8d7b3c12a7d9947f7f147f6c62e2a6d940ff1915b9d7a748e7531607be83cea054f9d98eaaf4a16fa1cd30ba
7
- data.tar.gz: fa0ee25c7102b4016bfca9c08beaf4407f866bf0759c014ccf7bd9c8db6ff9a62a6befb752bd1a37d9fe35bc15682b73137a2d0fc771dc7f96a389a9a45db3bf
6
+ metadata.gz: 580ed3fdb188f2098507f3d2acdea44071d4e0830036ce9a9763402352015a026660eaf1084416d93efd1ee3a1c6dd85e922ab63ea3cdf6305ef7f695a8d818f
7
+ data.tar.gz: 3d09be55d32ad1cd5caae3110a48336d1c2b35db8cfff03ab78769a37db2cda973850778f2c246dd8bc92837dfb6831f077169cd0c415726817ad87a97306926
@@ -2,10 +2,6 @@ class AmazonWish
2
2
 
3
3
  attr_reader :title, :id
4
4
 
5
- TITLE_TRIMMER = Proc.new do |char|
6
- char == "\n" || char == ' '
7
- end
8
-
9
5
  def initialize(id, title)
10
6
  @title = title
11
7
  @id = id
@@ -55,8 +51,7 @@ class AmazonWish
55
51
  item_url = 'https://www.amazon.com/dp/' + id
56
52
  response = RestClient.get(item_url)
57
53
  page = Nokogiri::HTML(response)
58
- title_text = page.css('span[id$="roductTitle"]').children.text
59
- title = trim_title(title_text)
54
+ title = page.css('span[id$="roductTitle"]').children.text.strip
60
55
  # not a typo, css selectors are
61
56
  #=> case sensetive, and we need to capture e.g. both "productTitle" and "ebookProductTitle"
62
57
  # price = page.css('priceblock_ourprice')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazon_wish_miner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander V. Trujillo