link_thumbnailer 3.2.0 → 3.4.0
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 +5 -5
- data/.ruby-version +1 -0
- data/.travis.yml +2 -4
- data/CHANGELOG.md +252 -75
- data/Gemfile +5 -3
- data/README.md +4 -0
- data/Rakefile +2 -0
- data/lib/generators/link_thumbnailer/install_generator.rb +2 -0
- data/lib/generators/templates/initializer.rb +15 -0
- data/lib/link_thumbnailer.rb +2 -0
- data/lib/link_thumbnailer/configuration.rb +74 -68
- data/lib/link_thumbnailer/exceptions.rb +3 -0
- data/lib/link_thumbnailer/grader.rb +2 -0
- data/lib/link_thumbnailer/graders/base.rb +2 -0
- data/lib/link_thumbnailer/graders/html_attribute.rb +2 -0
- data/lib/link_thumbnailer/graders/length.rb +2 -0
- data/lib/link_thumbnailer/graders/link_density.rb +2 -0
- data/lib/link_thumbnailer/graders/position.rb +2 -0
- data/lib/link_thumbnailer/image_comparator.rb +2 -0
- data/lib/link_thumbnailer/image_comparators/base.rb +2 -0
- data/lib/link_thumbnailer/image_comparators/size.rb +2 -0
- data/lib/link_thumbnailer/image_parser.rb +13 -1
- data/lib/link_thumbnailer/image_validator.rb +2 -0
- data/lib/link_thumbnailer/model.rb +20 -17
- data/lib/link_thumbnailer/models/description.rb +2 -0
- data/lib/link_thumbnailer/models/favicon.rb +2 -0
- data/lib/link_thumbnailer/models/image.rb +56 -54
- data/lib/link_thumbnailer/models/title.rb +2 -0
- data/lib/link_thumbnailer/models/video.rb +2 -0
- data/lib/link_thumbnailer/models/website.rb +54 -52
- data/lib/link_thumbnailer/page.rb +4 -1
- data/lib/link_thumbnailer/parser.rb +3 -1
- data/lib/link_thumbnailer/processor.rb +38 -5
- data/lib/link_thumbnailer/railtie.rb +2 -0
- data/lib/link_thumbnailer/response.rb +39 -0
- data/lib/link_thumbnailer/scraper.rb +62 -60
- data/lib/link_thumbnailer/scrapers/base.rb +69 -67
- data/lib/link_thumbnailer/scrapers/default/base.rb +2 -0
- data/lib/link_thumbnailer/scrapers/default/description.rb +2 -0
- data/lib/link_thumbnailer/scrapers/default/favicon.rb +16 -2
- data/lib/link_thumbnailer/scrapers/default/images.rb +5 -1
- data/lib/link_thumbnailer/scrapers/default/title.rb +2 -0
- data/lib/link_thumbnailer/scrapers/default/videos.rb +2 -0
- data/lib/link_thumbnailer/scrapers/opengraph/base.rb +2 -0
- data/lib/link_thumbnailer/scrapers/opengraph/description.rb +2 -0
- data/lib/link_thumbnailer/scrapers/opengraph/favicon.rb +2 -0
- data/lib/link_thumbnailer/scrapers/opengraph/image.rb +7 -1
- data/lib/link_thumbnailer/scrapers/opengraph/images.rb +2 -0
- data/lib/link_thumbnailer/scrapers/opengraph/title.rb +2 -0
- data/lib/link_thumbnailer/scrapers/opengraph/video.rb +2 -0
- data/lib/link_thumbnailer/scrapers/opengraph/videos.rb +2 -0
- data/lib/link_thumbnailer/uri.rb +20 -0
- data/lib/link_thumbnailer/version.rb +3 -1
- data/lib/link_thumbnailer/video_parser.rb +3 -1
- data/link_thumbnailer.gemspec +8 -6
- data/spec/configuration_spec.rb +4 -2
- data/spec/fixture_spec.rb +21 -0
- data/spec/fixtures/default_with_few_favicons.html +15 -0
- data/spec/fixtures/google_shift_jis.html +6 -0
- data/spec/fixtures/google_utf8.html +6 -0
- data/spec/fixtures/google_utf8_no_meta_charset.html +6 -0
- data/spec/fixtures/with_related_path_in_href.html +13 -0
- data/spec/fixtures/with_root_path_in_href.html +13 -0
- data/spec/grader_spec.rb +3 -1
- data/spec/graders/base_spec.rb +2 -0
- data/spec/graders/html_attribute_spec.rb +9 -7
- data/spec/graders/length_spec.rb +10 -6
- data/spec/graders/link_density_spec.rb +4 -2
- data/spec/graders/position_spec.rb +8 -6
- data/spec/image_comparators/size_spec.rb +2 -0
- data/spec/image_validator_spec.rb +3 -1
- data/spec/model_spec.rb +2 -0
- data/spec/models/description_spec.rb +3 -1
- data/spec/models/favicon_spec.rb +2 -0
- data/spec/models/image_spec.rb +6 -4
- data/spec/models/title_spec.rb +2 -0
- data/spec/models/video_spec.rb +7 -5
- data/spec/models/website_spec.rb +5 -3
- data/spec/page_spec.rb +2 -0
- data/spec/processor_spec.rb +74 -23
- data/spec/response_spec.rb +84 -0
- data/spec/scraper_spec.rb +6 -4
- data/spec/scrapers/base_spec.rb +6 -4
- data/spec/scrapers/opengraph/base_spec.rb +8 -6
- data/spec/spec_helper.rb +2 -0
- data/spec/uri_spec.rb +44 -0
- data/spec/video_parser_spec.rb +15 -13
- metadata +37 -19
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'link_thumbnailer/scrapers/default/base'
|
|
2
4
|
require 'link_thumbnailer/models/favicon'
|
|
3
5
|
|
|
@@ -13,7 +15,11 @@ module LinkThumbnailer
|
|
|
13
15
|
private
|
|
14
16
|
|
|
15
17
|
def to_uri(href)
|
|
16
|
-
::URI.parse(href)
|
|
18
|
+
uri = ::URI.parse(href)
|
|
19
|
+
uri.scheme ||= website.url.scheme
|
|
20
|
+
uri.host ||= website.url.host
|
|
21
|
+
uri.path = uri.path&.sub(%r{^(?=[^\/])}, '/')
|
|
22
|
+
uri
|
|
17
23
|
rescue ::URI::InvalidURIError
|
|
18
24
|
nil
|
|
19
25
|
end
|
|
@@ -23,13 +29,21 @@ module LinkThumbnailer
|
|
|
23
29
|
end
|
|
24
30
|
|
|
25
31
|
def node
|
|
26
|
-
document.xpath("//link[contains(@rel, 'icon')]")
|
|
32
|
+
icons = document.xpath("//link[contains(@rel, 'icon')]")
|
|
33
|
+
retrieve_by_size(icons) || icons.first
|
|
27
34
|
end
|
|
28
35
|
|
|
29
36
|
def modelize(uri)
|
|
30
37
|
model_class.new(uri)
|
|
31
38
|
end
|
|
32
39
|
|
|
40
|
+
def retrieve_by_size(icons)
|
|
41
|
+
return if config.favicon_size.nil?
|
|
42
|
+
|
|
43
|
+
icons.find do |icon|
|
|
44
|
+
icon.attributes['sizes']&.value == config.favicon_size
|
|
45
|
+
end
|
|
46
|
+
end
|
|
33
47
|
end
|
|
34
48
|
end
|
|
35
49
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'link_thumbnailer/scrapers/default/base'
|
|
2
4
|
require 'link_thumbnailer/models/image'
|
|
3
5
|
|
|
@@ -57,7 +59,9 @@ module LinkThumbnailer
|
|
|
57
59
|
|
|
58
60
|
def base_href
|
|
59
61
|
base = document.at('//head/base')
|
|
60
|
-
base['href'] if base
|
|
62
|
+
base['href'] if base && ::URI.parse(base['href']).host
|
|
63
|
+
rescue ::URI::InvalidURIError
|
|
64
|
+
nil
|
|
61
65
|
end
|
|
62
66
|
|
|
63
67
|
def model_class
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'link_thumbnailer/scrapers/opengraph/base'
|
|
4
|
+
require 'link_thumbnailer/uri'
|
|
2
5
|
|
|
3
6
|
module LinkThumbnailer
|
|
4
7
|
module Scrapers
|
|
@@ -20,7 +23,10 @@ module LinkThumbnailer
|
|
|
20
23
|
end
|
|
21
24
|
|
|
22
25
|
def model
|
|
23
|
-
nodes.map
|
|
26
|
+
nodes.map do |n|
|
|
27
|
+
uri = LinkThumbnailer::URI.new(n.attributes['content'])
|
|
28
|
+
modelize(n, uri.to_s) if uri.valid?
|
|
29
|
+
end.compact
|
|
24
30
|
end
|
|
25
31
|
|
|
26
32
|
def modelize(node, text = nil)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module LinkThumbnailer
|
|
4
|
+
class URI
|
|
5
|
+
|
|
6
|
+
attr_reader :attribute
|
|
7
|
+
|
|
8
|
+
def initialize(uri)
|
|
9
|
+
@attribute = uri.to_s
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def valid?
|
|
13
|
+
!!(attribute =~ ::URI::regexp)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def to_s
|
|
17
|
+
attribute
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'video_info'
|
|
2
4
|
|
|
3
5
|
module LinkThumbnailer
|
|
@@ -6,7 +8,7 @@ module LinkThumbnailer
|
|
|
6
8
|
attr_reader :parser
|
|
7
9
|
|
|
8
10
|
def initialize(video)
|
|
9
|
-
@parser = ::VideoInfo.new(video.src.to_s)
|
|
11
|
+
@parser = ::VideoInfo.new(video.src.dup.to_s)
|
|
10
12
|
rescue ::VideoInfo::UrlError
|
|
11
13
|
@parser = nil
|
|
12
14
|
end
|
data/link_thumbnailer.gemspec
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
2
4
|
lib = File.expand_path('../lib', __FILE__)
|
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
6
|
require 'link_thumbnailer/version'
|
|
@@ -18,10 +20,10 @@ Gem::Specification.new do |spec|
|
|
|
18
20
|
spec.require_paths = ['lib']
|
|
19
21
|
|
|
20
22
|
spec.add_dependency 'activesupport', '>= 3.0'
|
|
21
|
-
spec.add_dependency 'json', ['>= 1.7.7'
|
|
22
|
-
spec.add_dependency 'rake', '>= 0.9'
|
|
23
|
-
spec.add_dependency 'nokogiri', '
|
|
24
|
-
spec.add_dependency 'net-http-persistent', '
|
|
25
|
-
spec.add_dependency 'video_info', '
|
|
26
|
-
spec.add_dependency 'image_info', '~> 1.0'
|
|
23
|
+
spec.add_dependency 'json', ['>= 1.7.7']
|
|
24
|
+
spec.add_dependency 'rake', ['>= 0.9']
|
|
25
|
+
spec.add_dependency 'nokogiri', '>= 1.6'
|
|
26
|
+
spec.add_dependency 'net-http-persistent', '>= 2.9'
|
|
27
|
+
spec.add_dependency 'video_info', '>= 2.6'
|
|
28
|
+
spec.add_dependency 'image_info', ['~> 1.0', '>= 1.2.0']
|
|
27
29
|
end
|
data/spec/configuration_spec.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
describe LinkThumbnailer::Configuration do
|
|
@@ -18,6 +20,7 @@ describe LinkThumbnailer::Configuration do
|
|
|
18
20
|
it { expect(instance.image_limit).to eq(5) }
|
|
19
21
|
it { expect(instance.image_stats).to eq(true) }
|
|
20
22
|
it { expect(instance.max_concurrency).to eq(20) }
|
|
23
|
+
it { expect(instance.encoding).to eq('utf-8') }
|
|
21
24
|
|
|
22
25
|
describe "#http_timeout" do
|
|
23
26
|
it { expect(instance.method(:http_timeout)).to eq(instance.method(:http_open_timeout)) }
|
|
@@ -33,7 +36,7 @@ describe LinkThumbnailer::Configuration do
|
|
|
33
36
|
describe '.configure' do
|
|
34
37
|
|
|
35
38
|
before do
|
|
36
|
-
LinkThumbnailer.
|
|
39
|
+
allow(LinkThumbnailer).to receive(:config).and_return(instance)
|
|
37
40
|
end
|
|
38
41
|
|
|
39
42
|
context 'when block given' do
|
|
@@ -56,4 +59,3 @@ describe LinkThumbnailer::Configuration do
|
|
|
56
59
|
end
|
|
57
60
|
|
|
58
61
|
end
|
|
59
|
-
|
data/spec/fixture_spec.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
describe 'Fixture' do
|
|
@@ -107,6 +109,25 @@ describe 'Fixture' do
|
|
|
107
109
|
|
|
108
110
|
end
|
|
109
111
|
|
|
112
|
+
context 'with 32 favicon size' do
|
|
113
|
+
let(:action) { LinkThumbnailer.generate(url, favicon_size: '32x32') }
|
|
114
|
+
let(:favicon) { 'http://foo.com/foo32x32.ico' }
|
|
115
|
+
let(:html) { File.open(File.dirname(__FILE__) + '/fixtures/default_with_few_favicons.html').read }
|
|
116
|
+
|
|
117
|
+
it { expect(action.favicon).to eq(favicon) }
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
context 'when favicon with root path in the href' do
|
|
121
|
+
let(:html) { File.open(File.dirname(__FILE__) + '/fixtures/with_root_path_in_href.html').read }
|
|
122
|
+
|
|
123
|
+
it { expect(action.favicon).to eq(favicon) }
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
context 'when favicon with related path in the href' do
|
|
127
|
+
let(:html) { File.open(File.dirname(__FILE__) + '/fixtures/with_related_path_in_href.html').read }
|
|
128
|
+
|
|
129
|
+
it { expect(action.favicon).to eq(favicon) }
|
|
130
|
+
end
|
|
110
131
|
end
|
|
111
132
|
|
|
112
133
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<title>Title from meta</title>
|
|
4
|
+
<link rel="shortcut icon" href="http://foo.com/foo.ico">
|
|
5
|
+
<link rel="shortcut icon" sizes='32x32' href="http://foo.com/foo32x32.ico">
|
|
6
|
+
<link rel="shortcut icon" sizes='16x16' href="http://foo.com/foo16x16.ico">
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
|
|
10
|
+
<p>Description from body</p>
|
|
11
|
+
|
|
12
|
+
<img src="http://foo.com/foo.png">
|
|
13
|
+
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="ja"><head><meta content="���E���̂���������������邽�߂̃c�[������Ă��܂��B���܂��܂Ȍ����@�\�����p���āA���T���̏��������Ă��������B" name="description"><meta content="noodp" name="robots"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title><script>(function(){window.google={kEI:'716VWJL3JYq18QWo_qzoAg',kEXPI:'750722,1351903,1352241,1352381,3700253,3700347,4028875,4029815,4032677,4038012,4043492,4045839,4048347,4062666,4065787,4068816,4069773,4069838,4069840,4070138,4072773,4073405,4073726,4073959,4076096,4076931,4076999,4077777,4078438,4079081,4079105,4079894,4081038,4081485,4082194,4082201,4082298,4082619,4083044,4083476,4084343,4084673,4085336,4085412,4085683,4086011,4089003,4089144,4089183,4089427,4089538,4089913,4090414,4090547,4090549,4090598,4090657,4090806,4090893,4091966,4092028,4092182,4092218,4092474,4092478,4092598,4092864,4092867,4092875,4092897,4092934,4093073,4093948,4094169,4094250,4094769,4094987,4094997,4095554,4095771,4095907,4095998,8300096,8300272,8507380,8507419,8507861,8507940,8508624,8510023,10200083,13500022,13500024',authuser:0,kscs:'c9c918f0_24'};google.kHL='ja';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI};google.getLEI=function(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return null};google.wl=function(a,b){try{google.ml(Error(a),!1,b)}catch(c){}};google.time=function(){return(new Date).getTime()};google.log=function(a,b,c,d,g){a=google.logUrl(a,b,c,d,g);if(""!=a){b=new Image;var e=google.lc,f=google.li;e[f]=b;b.onerror=b.onload=b.onabort=function(){delete e[f]};window.google&&window.google.vel&&window.google.vel.lu&&window.google.vel.lu(a);b.src=a;google.li=f+1}};google.logUrl=function(a,b,c,d,g){var e="",f=google.ls||"";c||-1!=b.search("&ei=")||(e="&ei="+google.getEI(d),-1==b.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));a=c||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+f+"&zx="+google.time();/^http:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="");return a};google.y={};google.x=function(a,b){google.y[a.id]=[a,b];return!1};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
|
|
2
|
+
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#36c}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important}body{background:#fff;color:black}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead a.gb2:hover{color:#fff !important}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}.ftl,#fll a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}</style><script></script><link href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut icon"></head><body bgcolor="#fff"><script>(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
|
|
3
|
+
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
|
|
4
|
+
}
|
|
5
|
+
})();</script><div id="mngb"> <div id=gbar><nobr><b class=gb1>����</b> <a class=gb1 href="https://www.google.co.jp/imghp?hl=ja&tab=wi">�摜</a> <a class=gb1 href="https://maps.google.co.jp/maps?hl=ja&tab=wl">�}�b�v</a> <a class=gb1 href="https://play.google.com/?hl=ja&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?gl=JP&tab=w1">YouTube</a> <a class=gb1 href="https://news.google.co.jp/nwshp?hl=ja&tab=wn">�j���[�X</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">�h���C�u</a> <a class=gb1 style="text-decoration:none" href="https://www.google.co.jp/intl/ja/options/"><u>�����ƌ���</u> »</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.co.jp/history/optout?hl=ja" class=gb4>�E�F�u����</a> | <a href="/preferences?hl=ja" class=gb4>�ݒ�</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=ja&passive=true&continue=https://www.google.co.jp/" class=gb4>���O�C��</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div> </div><center><br clear="all" id="lgpd"><div id="lga"><div style="padding:28px 0 3px"><div style="height:110px;width:276px;background:url(/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png) no-repeat" title="Google" align="left" id="hplogo" onload="window.lol&&lol()"><div style="color:#777;font-size:16px;font-weight:bold;position:relative;top:70px;left:218px" nowrap="">���{</div></div></div><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%"> </td><td align="center" nowrap=""><input name="ie" value="Shift_JIS" type="hidden"><input value="ja" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top" autocomplete="off" class="lst" value="" title="Google ����" maxlength="2048" name="q" size="57"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google ����" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" value="I'm Feeling Lucky" name="btnI" onclick="if(this.form.q.value)this.checked=1; else top.location='/doodles/'" type="submit"></span></span></td><td class="fl sblc" align="left" nowrap="" width="25%"><a href="/advanced_search?hl=ja&authuser=0">�����I�v�V����</a><a href="/language_tools?hl=ja&authuser=0">����c�[��</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="fll"><a href="/intl/ja/ads/">�L���f��</a><a href="http://www.google.co.jp/intl/ja/services/">�r�W�l�X �\�����[�V����</a><a href="https://plus.google.com/115899767381375908215" rel="publisher">+Google</a><a href="/intl/ja/about.html">Google �ɂ���</a><a href="https://www.google.co.jp/setprefdomain?prefdom=US&sig=__NSwOcr0nRFmauaxJWrHJmztdkTc%3D" id="fehl">Google.com</a></div></div><p style="color:#767676;font-size:8pt">© 2017 - <a href="/intl/ja/policies/privacy/">�v���C�o�V�[</a> - <a href="/intl/ja/policies/terms/">�K��</a></p></span></center><script>(function(){window.google.cdo={height:0,width:0};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b)var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body,a=d.clientWidth,b=d.clientHeight;a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();</script><div id="xjsd"></div><div id="xjsi"><script>(function(){function c(b){window.setTimeout(function(){var a=document.createElement("script");a.src=b;document.getElementById("xjsd").appendChild(a)},0)}google.dljp=function(b,a){google.xjsu=b;c(a)};google.dlj=c;}).call(this);(function(){window.google.xjsrm=[];})();if(google.y)google.y.first=[];if(!google.xjs){window._=window._||{};window._._DumpException=function(e){throw e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new Date().getTime();}google.dljp('/xjs/_/js/k\x3dxjs.hp.en_US.usfcb5N0rIw.O/m\x3dsb_he,d/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oH_6o1ZdJ1OdBerX9LppN-xEd11Eg','/xjs/_/js/k\x3dxjs.hp.en_US.usfcb5N0rIw.O/m\x3dsb_he,d/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oH_6o1ZdJ1OdBerX9LppN-xEd11Eg');google.xjs=1;}google.pmc={"sb_he":{"agen":true,"cgen":true,"client":"heirloom-hp","dh":true,"dhqt":true,"ds":"","fl":true,"host":"google.co.jp","isbh":28,"jam":0,"jsonp":true,"msgs":{"cibl":"�������N���A","dym":"����������:","lcky":"I\u0026#39;m Feeling Lucky","lml":"�ڍ�","oskt":"���̓c�[��","psrc":"���̌����L�[���[�h��\u003Ca href=\"/history\"\u003E�E�F�u����\u003C/a\u003E����폜����܂���","psrl":"�폜","sbit":"�摜�Ō���","srch":"Google ����"},"nds":true,"ovr":{},"pq":"","refpd":true,"refspre":true,"rfs":[],"scd":10,"sce":5,"stok":"WXDdTX_0YGr0J9JRNcHRvk23BlI"},"d":{}};google.y.first.push(function(){if(google.med){google.med('init');google.initHistory();google.med('history');}});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}
|
|
6
|
+
</script></div></body></html>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="ja"><head><meta content="世界中のあらゆる情報を検索するためのツールを提供しています。さまざまな検索機能を活用して、お探しの情報を見つけてください。" name="description"><meta content="noodp" name="robots"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title><script>(function(){window.google={kEI:'716VWJL3JYq18QWo_qzoAg',kEXPI:'750722,1351903,1352241,1352381,3700253,3700347,4028875,4029815,4032677,4038012,4043492,4045839,4048347,4062666,4065787,4068816,4069773,4069838,4069840,4070138,4072773,4073405,4073726,4073959,4076096,4076931,4076999,4077777,4078438,4079081,4079105,4079894,4081038,4081485,4082194,4082201,4082298,4082619,4083044,4083476,4084343,4084673,4085336,4085412,4085683,4086011,4089003,4089144,4089183,4089427,4089538,4089913,4090414,4090547,4090549,4090598,4090657,4090806,4090893,4091966,4092028,4092182,4092218,4092474,4092478,4092598,4092864,4092867,4092875,4092897,4092934,4093073,4093948,4094169,4094250,4094769,4094987,4094997,4095554,4095771,4095907,4095998,8300096,8300272,8507380,8507419,8507861,8507940,8508624,8510023,10200083,13500022,13500024',authuser:0,kscs:'c9c918f0_24'};google.kHL='ja';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI};google.getLEI=function(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return null};google.wl=function(a,b){try{google.ml(Error(a),!1,b)}catch(c){}};google.time=function(){return(new Date).getTime()};google.log=function(a,b,c,d,g){a=google.logUrl(a,b,c,d,g);if(""!=a){b=new Image;var e=google.lc,f=google.li;e[f]=b;b.onerror=b.onload=b.onabort=function(){delete e[f]};window.google&&window.google.vel&&window.google.vel.lu&&window.google.vel.lu(a);b.src=a;google.li=f+1}};google.logUrl=function(a,b,c,d,g){var e="",f=google.ls||"";c||-1!=b.search("&ei=")||(e="&ei="+google.getEI(d),-1==b.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));a=c||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+f+"&zx="+google.time();/^http:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="");return a};google.y={};google.x=function(a,b){google.y[a.id]=[a,b];return!1};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
|
|
2
|
+
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#36c}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important}body{background:#fff;color:black}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead a.gb2:hover{color:#fff !important}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}.ftl,#fll a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}</style><script></script><link href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut icon"></head><body bgcolor="#fff"><script>(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
|
|
3
|
+
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
|
|
4
|
+
}
|
|
5
|
+
})();</script><div id="mngb"> <div id=gbar><nobr><b class=gb1>検索</b> <a class=gb1 href="https://www.google.co.jp/imghp?hl=ja&tab=wi">画像</a> <a class=gb1 href="https://maps.google.co.jp/maps?hl=ja&tab=wl">マップ</a> <a class=gb1 href="https://play.google.com/?hl=ja&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?gl=JP&tab=w1">YouTube</a> <a class=gb1 href="https://news.google.co.jp/nwshp?hl=ja&tab=wn">ニュース</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">ドライブ</a> <a class=gb1 style="text-decoration:none" href="https://www.google.co.jp/intl/ja/options/"><u>もっと見る</u> »</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.co.jp/history/optout?hl=ja" class=gb4>ウェブ履歴</a> | <a href="/preferences?hl=ja" class=gb4>設定</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=ja&passive=true&continue=https://www.google.co.jp/" class=gb4>ログイン</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div> </div><center><br clear="all" id="lgpd"><div id="lga"><div style="padding:28px 0 3px"><div style="height:110px;width:276px;background:url(/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png) no-repeat" title="Google" align="left" id="hplogo" onload="window.lol&&lol()"><div style="color:#777;font-size:16px;font-weight:bold;position:relative;top:70px;left:218px" nowrap="">日本</div></div></div><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%"> </td><td align="center" nowrap=""><input name="ie" value="Shift_JIS" type="hidden"><input value="ja" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top" autocomplete="off" class="lst" value="" title="Google 検索" maxlength="2048" name="q" size="57"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google 検索" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" value="I'm Feeling Lucky" name="btnI" onclick="if(this.form.q.value)this.checked=1; else top.location='/doodles/'" type="submit"></span></span></td><td class="fl sblc" align="left" nowrap="" width="25%"><a href="/advanced_search?hl=ja&authuser=0">検索オプション</a><a href="/language_tools?hl=ja&authuser=0">言語ツール</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="fll"><a href="/intl/ja/ads/">広告掲載</a><a href="http://www.google.co.jp/intl/ja/services/">ビジネス ソリューション</a><a href="https://plus.google.com/115899767381375908215" rel="publisher">+Google</a><a href="/intl/ja/about.html">Google について</a><a href="https://www.google.co.jp/setprefdomain?prefdom=US&sig=__NSwOcr0nRFmauaxJWrHJmztdkTc%3D" id="fehl">Google.com</a></div></div><p style="color:#767676;font-size:8pt">© 2017 - <a href="/intl/ja/policies/privacy/">プライバシー</a> - <a href="/intl/ja/policies/terms/">規約</a></p></span></center><script>(function(){window.google.cdo={height:0,width:0};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b)var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body,a=d.clientWidth,b=d.clientHeight;a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();</script><div id="xjsd"></div><div id="xjsi"><script>(function(){function c(b){window.setTimeout(function(){var a=document.createElement("script");a.src=b;document.getElementById("xjsd").appendChild(a)},0)}google.dljp=function(b,a){google.xjsu=b;c(a)};google.dlj=c;}).call(this);(function(){window.google.xjsrm=[];})();if(google.y)google.y.first=[];if(!google.xjs){window._=window._||{};window._._DumpException=function(e){throw e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new Date().getTime();}google.dljp('/xjs/_/js/k\x3dxjs.hp.en_US.usfcb5N0rIw.O/m\x3dsb_he,d/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oH_6o1ZdJ1OdBerX9LppN-xEd11Eg','/xjs/_/js/k\x3dxjs.hp.en_US.usfcb5N0rIw.O/m\x3dsb_he,d/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oH_6o1ZdJ1OdBerX9LppN-xEd11Eg');google.xjs=1;}google.pmc={"sb_he":{"agen":true,"cgen":true,"client":"heirloom-hp","dh":true,"dhqt":true,"ds":"","fl":true,"host":"google.co.jp","isbh":28,"jam":0,"jsonp":true,"msgs":{"cibl":"検索をクリア","dym":"もしかして:","lcky":"I\u0026#39;m Feeling Lucky","lml":"詳細","oskt":"入力ツール","psrc":"この検索キーワードは\u003Ca href=\"/history\"\u003Eウェブ履歴\u003C/a\u003Eから削除されました","psrl":"削除","sbit":"画像で検索","srch":"Google 検索"},"nds":true,"ovr":{},"pq":"","refpd":true,"refspre":true,"rfs":[],"scd":10,"sce":5,"stok":"WXDdTX_0YGr0J9JRNcHRvk23BlI"},"d":{}};google.y.first.push(function(){if(google.med){google.med('init');google.initHistory();google.med('history');}});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}
|
|
6
|
+
</script></div></body></html>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="ja"><head><meta content="世界中のあらゆる情報を検索するためのツールを提供しています。さまざまな検索機能を活用して、お探しの情報を見つけてください。" name="description"><meta content="noodp" name="robots"><meta content="text/html" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title><script>(function(){window.google={kEI:'716VWJL3JYq18QWo_qzoAg',kEXPI:'750722,1351903,1352241,1352381,3700253,3700347,4028875,4029815,4032677,4038012,4043492,4045839,4048347,4062666,4065787,4068816,4069773,4069838,4069840,4070138,4072773,4073405,4073726,4073959,4076096,4076931,4076999,4077777,4078438,4079081,4079105,4079894,4081038,4081485,4082194,4082201,4082298,4082619,4083044,4083476,4084343,4084673,4085336,4085412,4085683,4086011,4089003,4089144,4089183,4089427,4089538,4089913,4090414,4090547,4090549,4090598,4090657,4090806,4090893,4091966,4092028,4092182,4092218,4092474,4092478,4092598,4092864,4092867,4092875,4092897,4092934,4093073,4093948,4094169,4094250,4094769,4094987,4094997,4095554,4095771,4095907,4095998,8300096,8300272,8507380,8507419,8507861,8507940,8508624,8510023,10200083,13500022,13500024',authuser:0,kscs:'c9c918f0_24'};google.kHL='ja';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI};google.getLEI=function(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return null};google.wl=function(a,b){try{google.ml(Error(a),!1,b)}catch(c){}};google.time=function(){return(new Date).getTime()};google.log=function(a,b,c,d,g){a=google.logUrl(a,b,c,d,g);if(""!=a){b=new Image;var e=google.lc,f=google.li;e[f]=b;b.onerror=b.onload=b.onabort=function(){delete e[f]};window.google&&window.google.vel&&window.google.vel.lu&&window.google.vel.lu(a);b.src=a;google.li=f+1}};google.logUrl=function(a,b,c,d,g){var e="",f=google.ls||"";c||-1!=b.search("&ei=")||(e="&ei="+google.getEI(d),-1==b.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));a=c||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+f+"&zx="+google.time();/^http:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="");return a};google.y={};google.x=function(a,b){google.y[a.id]=[a,b];return!1};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);var a=window.location,b=a.href.indexOf("#");if(0<=b){var c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
|
|
2
|
+
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#36c}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important}body{background:#fff;color:black}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead a.gb2:hover{color:#fff !important}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}.ftl,#fll a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}</style><script></script><link href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut icon"></head><body bgcolor="#fff"><script>(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
|
|
3
|
+
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
|
|
4
|
+
}
|
|
5
|
+
})();</script><div id="mngb"> <div id=gbar><nobr><b class=gb1>検索</b> <a class=gb1 href="https://www.google.co.jp/imghp?hl=ja&tab=wi">画像</a> <a class=gb1 href="https://maps.google.co.jp/maps?hl=ja&tab=wl">マップ</a> <a class=gb1 href="https://play.google.com/?hl=ja&tab=w8">Play</a> <a class=gb1 href="https://www.youtube.com/?gl=JP&tab=w1">YouTube</a> <a class=gb1 href="https://news.google.co.jp/nwshp?hl=ja&tab=wn">ニュース</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">ドライブ</a> <a class=gb1 style="text-decoration:none" href="https://www.google.co.jp/intl/ja/options/"><u>もっと見る</u> »</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.co.jp/history/optout?hl=ja" class=gb4>ウェブ履歴</a> | <a href="/preferences?hl=ja" class=gb4>設定</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=ja&passive=true&continue=https://www.google.co.jp/" class=gb4>ログイン</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div> </div><center><br clear="all" id="lgpd"><div id="lga"><div style="padding:28px 0 3px"><div style="height:110px;width:276px;background:url(/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png) no-repeat" title="Google" align="left" id="hplogo" onload="window.lol&&lol()"><div style="color:#777;font-size:16px;font-weight:bold;position:relative;top:70px;left:218px" nowrap="">日本</div></div></div><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%"> </td><td align="center" nowrap=""><input name="ie" value="Shift_JIS" type="hidden"><input value="ja" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top" autocomplete="off" class="lst" value="" title="Google 検索" maxlength="2048" name="q" size="57"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google 検索" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" value="I'm Feeling Lucky" name="btnI" onclick="if(this.form.q.value)this.checked=1; else top.location='/doodles/'" type="submit"></span></span></td><td class="fl sblc" align="left" nowrap="" width="25%"><a href="/advanced_search?hl=ja&authuser=0">検索オプション</a><a href="/language_tools?hl=ja&authuser=0">言語ツール</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="fll"><a href="/intl/ja/ads/">広告掲載</a><a href="http://www.google.co.jp/intl/ja/services/">ビジネス ソリューション</a><a href="https://plus.google.com/115899767381375908215" rel="publisher">+Google</a><a href="/intl/ja/about.html">Google について</a><a href="https://www.google.co.jp/setprefdomain?prefdom=US&sig=__NSwOcr0nRFmauaxJWrHJmztdkTc%3D" id="fehl">Google.com</a></div></div><p style="color:#767676;font-size:8pt">© 2017 - <a href="/intl/ja/policies/privacy/">プライバシー</a> - <a href="/intl/ja/policies/terms/">規約</a></p></span></center><script>(function(){window.google.cdo={height:0,width:0};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b)var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body,a=d.clientWidth,b=d.clientHeight;a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();</script><div id="xjsd"></div><div id="xjsi"><script>(function(){function c(b){window.setTimeout(function(){var a=document.createElement("script");a.src=b;document.getElementById("xjsd").appendChild(a)},0)}google.dljp=function(b,a){google.xjsu=b;c(a)};google.dlj=c;}).call(this);(function(){window.google.xjsrm=[];})();if(google.y)google.y.first=[];if(!google.xjs){window._=window._||{};window._._DumpException=function(e){throw e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new Date().getTime();}google.dljp('/xjs/_/js/k\x3dxjs.hp.en_US.usfcb5N0rIw.O/m\x3dsb_he,d/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oH_6o1ZdJ1OdBerX9LppN-xEd11Eg','/xjs/_/js/k\x3dxjs.hp.en_US.usfcb5N0rIw.O/m\x3dsb_he,d/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oH_6o1ZdJ1OdBerX9LppN-xEd11Eg');google.xjs=1;}google.pmc={"sb_he":{"agen":true,"cgen":true,"client":"heirloom-hp","dh":true,"dhqt":true,"ds":"","fl":true,"host":"google.co.jp","isbh":28,"jam":0,"jsonp":true,"msgs":{"cibl":"検索をクリア","dym":"もしかして:","lcky":"I\u0026#39;m Feeling Lucky","lml":"詳細","oskt":"入力ツール","psrc":"この検索キーワードは\u003Ca href=\"/history\"\u003Eウェブ履歴\u003C/a\u003Eから削除されました","psrl":"削除","sbit":"画像で検索","srch":"Google 検索"},"nds":true,"ovr":{},"pq":"","refpd":true,"refspre":true,"rfs":[],"scd":10,"sce":5,"stok":"WXDdTX_0YGr0J9JRNcHRvk23BlI"},"d":{}};google.y.first.push(function(){if(google.med){google.med('init');google.initHistory();google.med('history');}});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}
|
|
6
|
+
</script></div></body></html>
|
data/spec/grader_spec.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
describe LinkThumbnailer::Grader do
|
|
@@ -15,7 +17,7 @@ describe LinkThumbnailer::Grader do
|
|
|
15
17
|
let(:action) { instance.call }
|
|
16
18
|
|
|
17
19
|
before do
|
|
18
|
-
instance.
|
|
20
|
+
allow(instance).to receive(:graders).and_return(graders)
|
|
19
21
|
end
|
|
20
22
|
|
|
21
23
|
it { expect(action).to eq((0.5 * 0.5) ** weight) }
|
data/spec/graders/base_spec.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
describe LinkThumbnailer::Graders::HtmlAttribute do
|
|
@@ -12,7 +14,7 @@ describe LinkThumbnailer::Graders::HtmlAttribute do
|
|
|
12
14
|
context 'when current node does not match attribute' do
|
|
13
15
|
|
|
14
16
|
before do
|
|
15
|
-
instance.
|
|
17
|
+
allow(instance).to receive(:attribute?).and_return(false)
|
|
16
18
|
end
|
|
17
19
|
|
|
18
20
|
it { expect(action).to eq(1.0) }
|
|
@@ -22,9 +24,9 @@ describe LinkThumbnailer::Graders::HtmlAttribute do
|
|
|
22
24
|
context 'when current node has a negative attribute' do
|
|
23
25
|
|
|
24
26
|
before do
|
|
25
|
-
instance.
|
|
26
|
-
instance.
|
|
27
|
-
instance.
|
|
27
|
+
allow(instance).to receive(:attribute?).and_return(true)
|
|
28
|
+
allow(instance).to receive(:negative?).and_return(true)
|
|
29
|
+
allow(instance).to receive(:positive?).and_return(false)
|
|
28
30
|
end
|
|
29
31
|
|
|
30
32
|
it { expect(action).to eq(0.0) }
|
|
@@ -34,9 +36,9 @@ describe LinkThumbnailer::Graders::HtmlAttribute do
|
|
|
34
36
|
context 'when current node has a positive attribute' do
|
|
35
37
|
|
|
36
38
|
before do
|
|
37
|
-
instance.
|
|
38
|
-
instance.
|
|
39
|
-
instance.
|
|
39
|
+
allow(instance).to receive(:attribute?).and_return(true)
|
|
40
|
+
allow(instance).to receive(:negative?).and_return(false)
|
|
41
|
+
allow(instance).to receive(:positive?).and_return(true)
|
|
40
42
|
end
|
|
41
43
|
|
|
42
44
|
it { expect(action).to eq(1.0) }
|
data/spec/graders/length_spec.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
describe LinkThumbnailer::Graders::Length do
|
|
@@ -7,7 +9,7 @@ describe LinkThumbnailer::Graders::Length do
|
|
|
7
9
|
let(:instance) { described_class.new(description) }
|
|
8
10
|
|
|
9
11
|
before do
|
|
10
|
-
instance.
|
|
12
|
+
allow(instance).to receive(:config).and_return(config)
|
|
11
13
|
end
|
|
12
14
|
|
|
13
15
|
describe '#call' do
|
|
@@ -17,7 +19,7 @@ describe LinkThumbnailer::Graders::Length do
|
|
|
17
19
|
context 'when text is too short' do
|
|
18
20
|
|
|
19
21
|
before do
|
|
20
|
-
instance.
|
|
22
|
+
allow(instance).to receive(:too_short?).and_return(true)
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
it { expect(action).to eq(0.0) }
|
|
@@ -27,8 +29,8 @@ describe LinkThumbnailer::Graders::Length do
|
|
|
27
29
|
context 'when text is not too short' do
|
|
28
30
|
|
|
29
31
|
before do
|
|
30
|
-
instance.
|
|
31
|
-
instance.
|
|
32
|
+
allow(instance).to receive(:too_short?).and_return(false)
|
|
33
|
+
allow(instance).to receive(:text).and_return(text)
|
|
32
34
|
end
|
|
33
35
|
|
|
34
36
|
context 'when text length is 120' do
|
|
@@ -62,10 +64,12 @@ describe LinkThumbnailer::Graders::Length do
|
|
|
62
64
|
describe '#too_short?' do
|
|
63
65
|
|
|
64
66
|
let(:action) { instance.send(:too_short?) }
|
|
67
|
+
let(:config) { double }
|
|
65
68
|
|
|
66
69
|
before do
|
|
67
|
-
instance.
|
|
68
|
-
|
|
70
|
+
allow(instance).to receive(:config).and_return(config)
|
|
71
|
+
allow(config).to receive(:description_min_length).and_return(10)
|
|
72
|
+
allow(instance).to receive(:text).and_return(text)
|
|
69
73
|
end
|
|
70
74
|
|
|
71
75
|
context 'when true' do
|