specs_watcher 0.0.1
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 +7 -0
- data/.gitignore +15 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +63 -0
- data/Rakefile +7 -0
- data/bin/specs_watcher +5 -0
- data/lib/specs_watcher/availability.rb +23 -0
- data/lib/specs_watcher/cli.rb +57 -0
- data/lib/specs_watcher/errors.rb +5 -0
- data/lib/specs_watcher/formatter.rb +9 -0
- data/lib/specs_watcher/parsers/availability.rb +32 -0
- data/lib/specs_watcher/parsers/searcher.rb +40 -0
- data/lib/specs_watcher/requests.rb +30 -0
- data/lib/specs_watcher/searcher.rb +86 -0
- data/lib/specs_watcher/version.rb +3 -0
- data/lib/specs_watcher.rb +12 -0
- data/spec/fixtures/vcr_cassettes/availability_search_default_options.yml +105 -0
- data/spec/fixtures/vcr_cassettes/cli_availability.yml +106 -0
- data/spec/fixtures/vcr_cassettes/cli_keyword_bogus.yml +151 -0
- data/spec/fixtures/vcr_cassettes/cli_search_keyword_balvenie.yml +251 -0
- data/spec/fixtures/vcr_cassettes/searcher_search_bourbon.yml +2964 -0
- data/spec/fixtures/vcr_cassettes/searcher_search_default_options.yml +9461 -0
- data/spec/fixtures/vcr_cassettes/seracher_search_keyword_yamazaki.yml +169 -0
- data/spec/lib/specs_watcher/availability_spec.rb +20 -0
- data/spec/lib/specs_watcher/cli_spec.rb +144 -0
- data/spec/lib/specs_watcher/searcher_spec.rb +61 -0
- data/spec/spec_helper.rb +114 -0
- data/specs_watcher.gemspec +30 -0
- metadata +211 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4d1b76b3e18ceac97ed578c7a7afad97318716de
|
4
|
+
data.tar.gz: b45ff2641dc6dace3d0257438d80f9546e2d2dc9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8101756f021d66b783f2df6417d6b463b148ad9129f938a2befe9c0664aca7ff63414876d091e45998b9122769d0dff297653d14469fe6eb01e2331a98bab7be
|
7
|
+
data.tar.gz: 0c0b652f1723d68c5f0c0557c65be8b2d4c69d33cd7342a39a69201510325cc990b6535014cc8a6d32117fd4b6a7cfbb07ca41259510c10bf04cc99b1023ef38
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Aaron Ortbals
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# SpecsWatcher
|
2
|
+
|
3
|
+
Quickly search through Spec’s online inventory and check availability. This project is just for fun, and is not meant to be relied on in any sort of *serious* capacity.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
```shell
|
8
|
+
gem install specs_watcher
|
9
|
+
```
|
10
|
+
|
11
|
+
## Commands
|
12
|
+
|
13
|
+
Search through Spec's inventory.
|
14
|
+
|
15
|
+
```
|
16
|
+
specs_watcher search [KEYWORD] [(--category | -c)=CATEGORY] [(--verbose | -v)] [(--format | -f) FORMAT]
|
17
|
+
```
|
18
|
+
|
19
|
+
Check availability for an item by zip code and UPC
|
20
|
+
|
21
|
+
```
|
22
|
+
specs_watcher availability [ZIP] [UPC]
|
23
|
+
```
|
24
|
+
|
25
|
+
Describe available commands or one specific command
|
26
|
+
|
27
|
+
```
|
28
|
+
specs_watcher help [COMMAND]
|
29
|
+
```
|
30
|
+
|
31
|
+
## Examples
|
32
|
+
|
33
|
+
Search by keyword:
|
34
|
+
|
35
|
+
```
|
36
|
+
specs_watcher search balvenie
|
37
|
+
```
|
38
|
+
|
39
|
+
List a category:
|
40
|
+
|
41
|
+
```
|
42
|
+
specs_watcher search -c bourbon
|
43
|
+
```
|
44
|
+
|
45
|
+
Show the available categories:
|
46
|
+
|
47
|
+
```
|
48
|
+
specs_watcher help search
|
49
|
+
```
|
50
|
+
|
51
|
+
Use the power of unix to construct more complex queries:
|
52
|
+
|
53
|
+
```
|
54
|
+
specs_watcher search -c boutique_bourbon | egrep -i '(noahs mill|basil haydens)'
|
55
|
+
```
|
56
|
+
|
57
|
+
Print the output as json:
|
58
|
+
|
59
|
+
```
|
60
|
+
specs_watcher search balvenie -f json
|
61
|
+
```
|
62
|
+
|
63
|
+
Note: `--format json` always includes the additional columns provided by the `--verbose` flag.
|
data/Rakefile
ADDED
data/bin/specs_watcher
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require_relative 'requests'
|
2
|
+
|
3
|
+
module SpecsWatcher
|
4
|
+
class Availability
|
5
|
+
include SpecsWatcher::Requests
|
6
|
+
|
7
|
+
def self.search(options = {})
|
8
|
+
new.search(options)
|
9
|
+
end
|
10
|
+
|
11
|
+
def search(options)
|
12
|
+
raise SpecsWatcher::InvalidCategoryError, "'upc' and 'zip' are required" unless options[:upc] && options[:zip]
|
13
|
+
response = make_request(path, options.merge({x: '0', y: '0'}))
|
14
|
+
Parsers::Availability.parse(response.body)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def path
|
20
|
+
'/showavail'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'thor'
|
2
|
+
|
3
|
+
module SpecsWatcher
|
4
|
+
class CLI < Thor
|
5
|
+
|
6
|
+
map 's' => 'search'
|
7
|
+
map 'a' => 'availability'
|
8
|
+
|
9
|
+
desc "search [KEYWORD] [(--category | -c)=CATEGORY] [(--verbose | -v)] [(--format | -f) FORMAT]", "Search through Spec's Inventory"
|
10
|
+
long_desc <<-EOS
|
11
|
+
Search through or list Spec's Inventory
|
12
|
+
|
13
|
+
Alias: s
|
14
|
+
|
15
|
+
Format: 'table' (default), 'json'
|
16
|
+
|
17
|
+
Categories:
|
18
|
+
|
19
|
+
armagnac, blended_whiskey, bourbon, boutique_bourbon, brandy, canadian_whiskey, cocktails, cognac, cream_liqueurs, decanters, eau_de_vie, flavored_vodka, gift_liquor, gin, grappa, imported_vodka, irish_whisky, liqueur, miniatures_50ml, other_whiskeys, rum, scotch_blends, scotch_malts, tequila, tequila_super_premium, us_vodka, whiskey_flavored
|
20
|
+
|
21
|
+
EOS
|
22
|
+
option :category, aliases: '-c'
|
23
|
+
option :format, aliases: '-f', default: 'table'
|
24
|
+
option :verbose, aliases: '-v'
|
25
|
+
def search(keyword=nil)
|
26
|
+
searcher_options = options.dup
|
27
|
+
searcher_options.merge!({keyword: keyword}) if keyword
|
28
|
+
results = Searcher.search(searcher_options)
|
29
|
+
|
30
|
+
if results.any?
|
31
|
+
if options[:format] == 'json'
|
32
|
+
puts results.to_json
|
33
|
+
else
|
34
|
+
print_table(SpecsWatcher::Formatter.array_hash_to_table(results))
|
35
|
+
end
|
36
|
+
else
|
37
|
+
puts "No Results."
|
38
|
+
end
|
39
|
+
rescue SpecsWatcher::InvalidCategoryError => e
|
40
|
+
say(e, :red)
|
41
|
+
end
|
42
|
+
|
43
|
+
desc "availability ZIP UPC", "Check availability for an item by zip code and UPC"
|
44
|
+
long_desc <<-EOS
|
45
|
+
Check availability for an item by zip code and UPC
|
46
|
+
|
47
|
+
Alias: a
|
48
|
+
EOS
|
49
|
+
def availability(zip, upc)
|
50
|
+
results = Availability.search({ zip: zip, upc: upc })
|
51
|
+
puts results[:title]
|
52
|
+
print_table(SpecsWatcher::Formatter.array_hash_to_table(results[:locations]))
|
53
|
+
rescue SpecsWatcher::SpecsWatcherError => e
|
54
|
+
say(e, :red)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
|
3
|
+
module SpecsWatcher
|
4
|
+
module Parsers
|
5
|
+
class Availability
|
6
|
+
def self.parse(raw_html)
|
7
|
+
new(raw_html).parse
|
8
|
+
end
|
9
|
+
|
10
|
+
attr_reader :raw_html
|
11
|
+
def initialize(raw_html)
|
12
|
+
@raw_html = raw_html
|
13
|
+
end
|
14
|
+
|
15
|
+
def parse
|
16
|
+
doc = Nokogiri::HTML(raw_html)
|
17
|
+
rows = doc.css('table')[1].css('tr')
|
18
|
+
{
|
19
|
+
title: doc.css('center').css('font')[0].children[2].text.strip,
|
20
|
+
locations: rows.map { |r| parse_rows(r) }
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
def parse_rows(tr)
|
25
|
+
{
|
26
|
+
store_name: tr.children[0].text,
|
27
|
+
availability: tr.children[1].text
|
28
|
+
}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
|
3
|
+
module SpecsWatcher
|
4
|
+
module Parsers
|
5
|
+
class Searcher
|
6
|
+
def self.parse(raw_html)
|
7
|
+
new(raw_html).parse
|
8
|
+
end
|
9
|
+
|
10
|
+
attr_reader :raw_html
|
11
|
+
def initialize(raw_html)
|
12
|
+
@raw_html = raw_html
|
13
|
+
end
|
14
|
+
|
15
|
+
def parse
|
16
|
+
doc = Nokogiri::HTML(raw_html)
|
17
|
+
rows = doc.css('tr[valign="TOP"]')
|
18
|
+
rows.map { |r| parse_row(r) }
|
19
|
+
end
|
20
|
+
|
21
|
+
def parse_row(r)
|
22
|
+
td = r.css("td")
|
23
|
+
{
|
24
|
+
title: td[1].children[0].text.strip,
|
25
|
+
price: td[4].children[0].text.strip.to_f,
|
26
|
+
size: td[2].text.strip,
|
27
|
+
case_price: td[4].children[2].text.strip.to_f,
|
28
|
+
case_size: td[3].children[2].text.strip,
|
29
|
+
description: td[1].children[3].text.strip,
|
30
|
+
image: image_base_uri + r.css("img").first["src"],
|
31
|
+
upc: td.css('a').last['onclick'][/showavail\('(.*)'\)/, 1]
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def image_base_uri
|
36
|
+
"http://www.specsonline.com"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'typhoeus'
|
2
|
+
|
3
|
+
module SpecsWatcher
|
4
|
+
module Requests
|
5
|
+
protected
|
6
|
+
|
7
|
+
def base_uri
|
8
|
+
"http://www.specsonline.com/cgi-bin"
|
9
|
+
end
|
10
|
+
|
11
|
+
def make_request(path, params = {})
|
12
|
+
Typhoeus.get(base_uri + path,
|
13
|
+
method: :get,
|
14
|
+
params: params,
|
15
|
+
headers: headers,
|
16
|
+
accept_encoding: 'gzip')
|
17
|
+
end
|
18
|
+
|
19
|
+
def headers
|
20
|
+
{
|
21
|
+
'DNT' => '1',
|
22
|
+
'Accept-Language' => 'en-US,en;q=0.8',
|
23
|
+
'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36',
|
24
|
+
'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
|
25
|
+
'Referer' => 'http://www.specsonline.com/cgi-bin/search?keyword=&inclass=Liquors&webclass=Liquors&subclass=130&origin=®ion=&size=&Sortby=Name&pricefrom=&pricethru=&',
|
26
|
+
'Connection' => 'keep-alive'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require_relative 'requests'
|
2
|
+
|
3
|
+
module SpecsWatcher
|
4
|
+
class Searcher
|
5
|
+
include SpecsWatcher::Requests
|
6
|
+
|
7
|
+
def self.search(options = {})
|
8
|
+
new.search(options)
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.sub_categories
|
12
|
+
{
|
13
|
+
armagnac: "145",
|
14
|
+
blended_whiskey: "135",
|
15
|
+
bourbon: "120",
|
16
|
+
boutique_bourbon: "130",
|
17
|
+
brandy: "140",
|
18
|
+
canadian_whiskey: "125",
|
19
|
+
cocktails: "160",
|
20
|
+
cognac: "150",
|
21
|
+
cream_liqueurs: "221",
|
22
|
+
decanters: "270",
|
23
|
+
eau_de_vie: "158",
|
24
|
+
flavored_vodka: "286",
|
25
|
+
gift_liquor: "275",
|
26
|
+
gin: "180",
|
27
|
+
grappa: "155",
|
28
|
+
imported_vodka: "285",
|
29
|
+
irish_whisky: "200",
|
30
|
+
liqueur: "220",
|
31
|
+
miniatures_50ml: "290",
|
32
|
+
other_whiskeys: "258",
|
33
|
+
rum: "240",
|
34
|
+
scotch_blends: "250",
|
35
|
+
scotch_malts: "255",
|
36
|
+
tequila: "260",
|
37
|
+
tequila_super_premium: "265",
|
38
|
+
us_vodka: "280",
|
39
|
+
whiskey_flavored: "121"
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
def search(options)
|
44
|
+
response = make_request(path, params(options))
|
45
|
+
results = Parsers::Searcher.parse(response.body)
|
46
|
+
unless options[:verbose] || options[:format] == 'json'
|
47
|
+
results.each { |r| r.delete :description }
|
48
|
+
results.each { |r| r.delete :image }
|
49
|
+
end
|
50
|
+
results
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def path
|
56
|
+
"/search"
|
57
|
+
end
|
58
|
+
|
59
|
+
def params(override = {})
|
60
|
+
{
|
61
|
+
pageid: 'search',
|
62
|
+
inclass: 'Liquors',
|
63
|
+
webclass: 'Liquors',
|
64
|
+
subclass: category(override[:category]),
|
65
|
+
showmax: 1000,
|
66
|
+
noask: 'noask',
|
67
|
+
submit: 'Click to Show More',
|
68
|
+
keyword: override[:keyword],
|
69
|
+
origin: nil,
|
70
|
+
size: nil,
|
71
|
+
region: nil,
|
72
|
+
pricefrom: nil,
|
73
|
+
pricethru: nil,
|
74
|
+
"Sortby" => 'Name'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
def category(key)
|
79
|
+
if key
|
80
|
+
value = self.class.sub_categories[key.to_sym]
|
81
|
+
raise SpecsWatcher::InvalidCategoryError, "'#{key}' is not a valid category" unless value
|
82
|
+
value
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require "specs_watcher/version"
|
2
|
+
require "specs_watcher/errors"
|
3
|
+
require "specs_watcher/formatter"
|
4
|
+
require "specs_watcher/parsers/searcher"
|
5
|
+
require "specs_watcher/parsers/availability"
|
6
|
+
require "specs_watcher/requests"
|
7
|
+
require "specs_watcher/searcher"
|
8
|
+
require "specs_watcher/availability"
|
9
|
+
require "specs_watcher/cli"
|
10
|
+
|
11
|
+
module SpecsWatcher
|
12
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://www.specsonline.com/cgi-bin/showavail?upc=085457000211&x=0&y=0&zip=77008
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML,
|
12
|
+
like Gecko) Chrome/38.0.2125.122 Safari/537.36
|
13
|
+
Dnt:
|
14
|
+
- '1'
|
15
|
+
Accept-Language:
|
16
|
+
- en-US,en;q=0.8
|
17
|
+
Accept:
|
18
|
+
- text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
|
19
|
+
Referer:
|
20
|
+
- http://www.specsonline.com/cgi-bin/search?keyword=&inclass=Liquors&webclass=Liquors&subclass=130&origin=®ion=&size=&Sortby=Name&pricefrom=&pricethru=&
|
21
|
+
Connection:
|
22
|
+
- keep-alive
|
23
|
+
response:
|
24
|
+
status:
|
25
|
+
code: 200
|
26
|
+
message: OK
|
27
|
+
headers:
|
28
|
+
Date:
|
29
|
+
- Sun, 23 Nov 2014 18:23:29 GMT
|
30
|
+
Content-Type:
|
31
|
+
- text/html
|
32
|
+
Transfer-Encoding:
|
33
|
+
- chunked
|
34
|
+
Connection:
|
35
|
+
- keep-alive
|
36
|
+
Keep-Alive:
|
37
|
+
- timeout=5
|
38
|
+
Vary:
|
39
|
+
- Accept-Encoding
|
40
|
+
Server:
|
41
|
+
- ''
|
42
|
+
Content-Encoding:
|
43
|
+
- gzip
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 3.0//EN\" \"html.dtd\">\n<HTML><HEAD>\n<script
|
47
|
+
language=\"JavaScript\">\nvar cartwin;\n\nfunction ordwin( form ) \n{\n\tvar
|
48
|
+
url = form;\n\n\tsmwin = window.open(url,'orderhist','width=600,height=640,alwaysRaised=yes,directories=no,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no,resizable=no,left=350,top=150,screenX=350,screenY=150');\n\tsmwin.focus();\n\treturn
|
49
|
+
false;\n}\n\nfunction smallwin( form ) \n{\n\tvar url = '/cgi-bin/pleasewait?Form='+form\n\n\tsmwin
|
50
|
+
= window.open(url,'SpecsOnline','width=500,height=440,alwaysRaised=yes,directories=no,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no,resizable=no,left=150,top=150,screenX=150,screenY=150');\n\tsmwin.focus();\n\treturn
|
51
|
+
false;\n}\n\nfunction rladdcart( upc ) \n{\n\tvar url = \"/cgi-bin/rlshowcart?upc=\"+upc\n\tvar
|
52
|
+
doreg = ''\n/*\n\tdoreg = loadreg();\n\tif ( doreg == 'register' )\n url
|
53
|
+
= '/cgi-bin/cartreg?upc='+upc;\t\n*/\n\tcartwin = window.open(url,\"ShoppingCart\",'width=600,height=480,alwaysRaised=yes,directories=no,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no,resizable=no,left=150,top=150,screenX=150,screenY=150');\n\tcartwin.focus();\n\treturn
|
54
|
+
false;\n}\nfunction addcart( upc ) \n{\n\tvar url = \"/cgi-bin/showcart?upc=\"+upc\n\tvar
|
55
|
+
doreg = ''\n/*\n\tdoreg = loadreg();\n\tif ( doreg == 'register' )\n url
|
56
|
+
= '/cgi-bin/cartreg?upc='+upc;\t\n*/\n\tcartwin = window.open(url,'ShoppingCart','width=600,height=480,alwaysRaised=yes,directories=no,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no,resizable=no,left=150,top=150,screenX=150,screenY=150');\n\tcartwin.focus();\n\treturn
|
57
|
+
false;\n}\n\nfunction showsyn ( upc ) \n{\n\tvar url = '/cgi-bin/pleasewait?Form=showsyn&upc='+upc\n\tsynwin
|
58
|
+
= window.open(url,'Synopsis','width=500,height=200,directories=no,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no,resizable=no,left=150,top=150,screenX=150,screenY=150');\n\tsynwin.focus();\n\treturn
|
59
|
+
false;\n}\n\nfunction showpic ( upc ) \n{\n\tvar url = '/cgi-bin/pleasewait?Form=showpic&upc='+upc\n\tpicwin
|
60
|
+
= window.open(url,'Picture','title=no,width=200,height=200,directories=no,location=no,menubar=no,status=no,scrollbars=no,toolbar=no,resizable=yes,left=250,top=250,screenX=250,screenY=250');\n\tpicwin.focus();\n\treturn
|
61
|
+
false;\n}\n\nfunction showpic2( upc )\n{\n\tvar x, y;\n\tvar divname = 'PicDiv';\n\tvar
|
62
|
+
imgsrc1 = '/prodpics/'+upc+'.jpg';\n\tvar imgsrc2 = '/images/close.jpg';\n/*\n\tx
|
63
|
+
= 200;\n\ty = 0;\n\tdocument.getElementById(divname).style.left = x;\n\tdocument.getElementById(divname).style.top
|
64
|
+
= y;\n*/\n\tdocument.getElementById(divname).innerHTML = \"<img id=PicImage
|
65
|
+
src=\\\"\" + imgsrc1 + \"\\\" onclick=hidepic() >\" + \"<img id=PicClose src=\\\"\"
|
66
|
+
+ imgsrc2 + \"\\\" onclick=hidepic() >\";\n\tdocument.getElementById(divname).style.display=
|
67
|
+
\"block\";\n\treturn false;\n}\n\nfunction hidekey()\n{\n\tvar divname = 'KeyDiv';\n\tdocument.getElementById(divname).innerHTML
|
68
|
+
= \"\";\n\tdocument.getElementById(divname).style.display = \"none\";\n\treturn
|
69
|
+
false;\n}\n\nfunction hidepic()\n{\n\tvar divname = 'PicDiv';\n\tdocument.getElementById(divname).innerHTML
|
70
|
+
= \"\";\n\tdocument.getElementById(divname).style.display = \"none\";\n\treturn
|
71
|
+
false;\n}\n\nfunction showkey ( upc ) \n{\n\tvar url = '/cgi-bin/pleasewait?Form=showkey&upc='+upc\n\tskeywin
|
72
|
+
= window.open(url,'KeyInfo','width=500,height=200,directories=no,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no,resizable=no,left=150,top=250,screenX=150,screenY=250');\n\tskeywin.focus();\n\treturn
|
73
|
+
false;\n}\n\nfunction showkey2( upc )\n{\nvar url = '/cgi-bin/pleasewait?Form=showkey&upc='+upc\n\tvar
|
74
|
+
x, y;\n\tvar divname = 'KeyDiv';\n\tvar imgsrc1 = '/prodpics/'+upc+'.jpg';\n\tvar
|
75
|
+
imgsrc2 = '/images/close.jpg';\n\tx = 125;\n\ty = 100;\n\tdocument.getElementById(divname).style.left
|
76
|
+
= x;\n\tdocument.getElementById(divname).style.top = y;\n\tdocument.getElementById(divname).innerHTML
|
77
|
+
= \"<iframe width=500 height=200 id=KeyURL src=\\\"\"+url+\"\\\" onclick=hidekey()
|
78
|
+
>\";\n\tdocument.getElementById(divname).style.display= \"block\";\n\treturn
|
79
|
+
false;\n}\n\t\nfunction showavail ( upc ) \n{\n\tvar url = '/cgi-bin/pleasewait?Form=showavail&upc='+upc\n\tskeywin
|
80
|
+
= window.open(url,'KeyInfo','width=540,height=500,directories=no,location=no,menubar=no,status=no,scrollbars=yes,toolbar=no,resizable=no,left=250,top=150,screenX=250,screenY=150');\n\tskeywin.focus();\n\treturn
|
81
|
+
false;\n}\n\nfunction showavail2 ( upc ) \n{\n\tvar url = '/cgi-bin/showavail&upc='+upc\n\tvar
|
82
|
+
x, y;\n\tvar divname = 'KeyDiv';\n\tx = 125;\n\ty = 100;\n\tdocument.getElementById(divname).style.left
|
83
|
+
= x;\n\tdocument.getElementById(divname).style.top = y;\n\tdocument.getElementById(divname).innerHTML
|
84
|
+
= \"<iframe width=500 height=400 id=AvlURL src=\\\"\"+url+\"\\\" onmouseleave=hidekey()
|
85
|
+
>\";\n\tdocument.getElementById(divname).style.display= \"block\";\n\treturn
|
86
|
+
false;\n}\n\n</script>\n<TITLE>Show Product Availability</TITLE></HEAD>\n<meta
|
87
|
+
http-equiv='Set-Cookie' content='zip=77008; path=/'>\n<BASEFONT SIZE=4><BODY
|
88
|
+
BGCOLOR=\"f0f0f0\" ></BODY >\n<CENTER>\n<font style=\"font-family:Trebuchet
|
89
|
+
MS;font-size:20;color:b0b0b0;font-weight:bold;\">\nCHECK IN-STORE AVAILABILITY<br>SMOOTH
|
90
|
+
AMBLER OLD SCOUT RYE WHISKEY 6/CS [USA] 750ML\n</font>\n<FORM action=/cgi-bin/showavail>\n<table>
|
91
|
+
\n<tr><td align=center colspan=3> <font size=3><b>Enter your Zip Code to check
|
92
|
+
availability at the stores near you:</b></font>\n<input type=hidden name=upc
|
93
|
+
value=\"085457000211\" ><input name=\"zip\" value=\"77008\" size=\"22,1\"
|
94
|
+
maxlength=\"40\" type=\"text\"><input src=\"/hgifs/go.gif\" onclick=\"submit()\"
|
95
|
+
border=\"0\" type=\"image\">\n</td></tr>\n</table>\n<TABLE WIDTH=98% BORDER=0>\n\n<TR><TD>00-Downtown</TD><TD>Limited
|
96
|
+
Availabilty</TD><TD align=right>. miles</TD><TD><A HREF=/cgi-bin/showmap?store=00&mode=mini>[Map]</A></TD></TR>\n<TR><TD>01-Kingwood</TD><TD>Limited
|
97
|
+
Availabilty</TD><TD align=right>. miles</TD><TD><A HREF=/cgi-bin/showmap?store=01&mode=mini>[Map]</A></TD></TR>\n<TR><TD>06-Bay
|
98
|
+
Area Blvd</TD><TD>Call Store</TD><TD align=right>. miles</TD><TD><A HREF=/cgi-bin/showmap?store=06&mode=mini>[Map]</A></TD></TR>\n<TR><TD>197-Spec's
|
99
|
+
Rector</TD><TD>Limited Availabilty</TD><TD align=right>. miles</TD><TD><A
|
100
|
+
HREF=/cgi-bin/showmap?store=197&mode=mini>[Map]</A></TD></TR>\n<TR><TD>41-Cinco
|
101
|
+
Ranch</TD><TD>Limited Availabilty</TD><TD align=right>. miles</TD><TD><A HREF=/cgi-bin/showmap?store=41&mode=mini>[Map]</A></TD></TR>\n<TR><TD>60-Highland
|
102
|
+
Park</TD><TD>Call Store</TD><TD align=right>. miles</TD><TD><A HREF=/cgi-bin/showmap?store=60&mode=mini>[Map]</A></TD></TR>\n</TABLE>\n</CENTER>\n</HTML>\n"
|
103
|
+
http_version:
|
104
|
+
recorded_at: Sun, 23 Nov 2014 18:23:34 GMT
|
105
|
+
recorded_with: VCR 2.9.3
|