noawsalbumart 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89987dc86951777d7ca8d283d340f9c8a0bd11a7
4
- data.tar.gz: cf53997813b5c064bf451764d3f30ede001cf9a3
3
+ metadata.gz: 45ad60d40151f5c08466f500ffcf19d2ea08c30a
4
+ data.tar.gz: 2498910d0a90e4135285669bd9d0cfceab5a0c81
5
5
  SHA512:
6
- metadata.gz: 3526987ba54da402bf2bbdb1363f156591d8c9675d268e24dd71b211df5b9dcdd5ddf94bf2588940111f88944ea62b86136e18254899e05cbc08b4f35d10f911
7
- data.tar.gz: edadc8b49df326cde44baff8d0140cea41f2aee34b34718a04d0a9e1f5ab0540fbfd55df6e27b0e67cefa07291137a03d5ee0da90c4ad8f2e70702e52bdaa093
6
+ metadata.gz: e78a5807a8a11c8a9e585a2cce47c8da2c8c2c037bdd49b0c3eee759aa72f3caf281abdf096cba9bc0933c209ca325cf92957c6c5382cbfadf9918cea9ff5c45
7
+ data.tar.gz: bf8f0ab57df1cbfed6d7747281e1c4518f2be3f29a88bf63ff6c357a3d3e8a848cee0443e2c37635a86d8cf7dd63a787ba831d8802d724a59f7c4832ccf9959b
data/README.md CHANGED
@@ -1,9 +1,5 @@
1
1
  # Noawsalbumart
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/noawsalbumart`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
3
  ## Installation
8
4
 
9
5
  Add this line to your application's Gemfile:
@@ -22,7 +18,9 @@ Or install it yourself as:
22
18
 
23
19
  ## Usage
24
20
 
25
- TODO: Write usage instructions here
21
+ NoAWSAlbumArt was mainly an exercise in building an alternative to Amazon Album Art, which works great, but does depend on having an AWS account. This gem simply scrapes Amazon's search result's with a hard-code query, a fairly brute force method and fragile to amazon's changes of their search bar.
22
+
23
+ I mainly chose to use amazon simply because of image normalization for most album art at certain sizes.
26
24
 
27
25
  ## Development
28
26
 
@@ -1,3 +1,3 @@
1
1
  module Noawsalbumart
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/noawsalbumart.rb CHANGED
@@ -9,7 +9,7 @@ module Noawsalbumart
9
9
  query = query_string(artist_name, album_name)
10
10
  retries = 3
11
11
  begin
12
- doc = Nokogiri::HTML(open("http://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=#{query}&rh=i%3Aaps%2Ck%3A#{query}"))
12
+ doc = Nokogiri::HTML(open("http://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=#{query}&rh=i%3Aaps%2Ck%3A#{query}").read, nil, 'utf-8')
13
13
  rescue OpenURI::HTTPError => error
14
14
  response = error.io
15
15
  puts response.status
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noawsalbumart
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth Liu