meta-picker 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +7 -0
- data/Gemfile +3 -0
- data/LICENSE.md +7 -0
- data/README.md +2 -0
- data/lib/meta-picker.rb +41 -0
- data/meta-picker.gemspec +32 -0
- data/spec/meta_picker_spec.rb +92 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/_all_meta/gets_all_meta_tags.yml +206 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/_initialize/gets_a_document.yml +206 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/_og_data/does_not_include_non_og_meta_tags.yml +206 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/_og_data/gets_all_og_meta_tags.yml +206 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/_twitter_card/does_not_include_non_twitter_meta_tags.yml +206 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/_twitter_card/gets_all_twitter_meta_tags.yml +206 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/live_tests/on_instagram/should_be_a_video.yml +344 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/live_tests/on_instagram/should_have_a_description.yml +344 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/live_tests/on_instagram/should_have_a_title.yml +344 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/live_tests/on_vine/should_be_a_video.yml +206 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/live_tests/on_vine/should_have_a_description.yml +206 -0
- data/spec/vcr/fixtures/cassettes/MetaPicker/live_tests/on_vine/should_have_a_title.yml +206 -0
- data/spec/vcr/vcr.rb +6 -0
- data/twitter_card.html +6 -0
- metadata +192 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZGNiMTAxMGQ2N2VkOWM0YTUwMTA3NGI1NzA4NzNlMWY5ZmU1ZGRjZg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
N2E0OTM2NTA4YjYwM2Y5MjFmNDAxZDA4Y2U5OTg3ZTUxNDNmOTQ1Ng==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDYzZThmNGE1NTY2MjllNzhjYTk5YmQ3N2EyYzdlNmNlYWEzMmMwMzg2NmZl
|
10
|
+
MGUwMjdlMzIwYWNkNWVkOGQwNmJjN2IzODVhMmU4NjFjZDYzNTM3OGZmYTdl
|
11
|
+
MThmMWY4Y2JkYjk2ZjViMzUxZWZlM2Q3NzQyMGM5NTIyMDVkOGU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YmVlZDhhZDg0N2JiOWZlM2U5YzE5Y2E5ZmNhMzM2ZGZiMjVkZjliNmZjODlm
|
14
|
+
ZGU3MmNhYjg1ODRkNmMxNTVmNjJiYzg3OGYyNjQ4ZWQyOWI3MDdkODYwMWQy
|
15
|
+
MDhjMzhjYWJmNDkyZWNkZDkyZmUwM2MzMDY5ZDFlOTBkYmFkNzE=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright (c) 2013 Mosaic Sales Solutions
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
data/lib/meta-picker.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'Nokogiri'
|
2
|
+
require 'hashie'
|
3
|
+
require 'faraday'
|
4
|
+
|
5
|
+
class MetaPicker
|
6
|
+
|
7
|
+
attr_reader :doc
|
8
|
+
|
9
|
+
def initialize(url)
|
10
|
+
self.doc = Nokogiri::HTML(Faraday.new(:url => url).get.body)
|
11
|
+
end
|
12
|
+
|
13
|
+
def twitter_card
|
14
|
+
hashify("twitter:")
|
15
|
+
end
|
16
|
+
|
17
|
+
def og_data
|
18
|
+
hashify("og:")
|
19
|
+
end
|
20
|
+
|
21
|
+
def all_meta
|
22
|
+
hashify("")
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
attr_writer :doc
|
28
|
+
|
29
|
+
def hashify(filter)
|
30
|
+
output = Hashie::Mash.new
|
31
|
+
(self.doc.xpath("//meta[starts-with(@property, '#{filter}')]") + self.doc.xpath("//meta[starts-with(@name, '#{filter}')]")).each do |i|
|
32
|
+
if i['property']
|
33
|
+
key = i['property'].to_s.gsub(filter, '').gsub(":", '_')
|
34
|
+
elsif i['name']
|
35
|
+
key = i['name'].to_s.gsub(filter, '').gsub(":", '_')
|
36
|
+
end
|
37
|
+
output.merge! key => i['content']
|
38
|
+
end
|
39
|
+
output
|
40
|
+
end
|
41
|
+
end
|
data/meta-picker.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/meta-picker/', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "meta-picker"
|
6
|
+
s.version = '0.1.0'
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.date = '2013-07-11'
|
9
|
+
s.authors = ["Stephen A. Wilson"]
|
10
|
+
s.email = ["stephen.wilson@mosaic.com"]
|
11
|
+
s.homepage = ""
|
12
|
+
s.summary = %q{}
|
13
|
+
s.description = %q{}
|
14
|
+
|
15
|
+
s.files = Dir["{lib,spec}/**/*", "[A-Z]*", "init.rb"]
|
16
|
+
s.require_path = "lib"
|
17
|
+
|
18
|
+
s.required_rubygems_version = ">= 1.3.4"
|
19
|
+
|
20
|
+
s.add_dependency 'nokogiri'
|
21
|
+
s.add_dependency 'hashie'
|
22
|
+
s.add_dependency 'faraday'
|
23
|
+
|
24
|
+
s.add_development_dependency "rspec"
|
25
|
+
s.add_development_dependency "vcr"
|
26
|
+
s.add_development_dependency "simplecov"
|
27
|
+
|
28
|
+
s.files = `git ls-files`.split("\n")
|
29
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
30
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
describe MetaPicker, :vcr do
|
4
|
+
let(:picker) do
|
5
|
+
Faraday.stub_chain(:new, :get, :body)
|
6
|
+
MetaPicker.new("http://www.example.com")
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "#initialize" do
|
10
|
+
it "gets a document" do
|
11
|
+
picker.doc.should be_a_kind_of(Nokogiri::HTML::Document)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "#twitter_card" do
|
16
|
+
it "gets all twitter meta tags" do
|
17
|
+
input = "<meta name='twitter:t_name' content='This is foo'><meta property='twitter:t_property' content='This is bar'>"
|
18
|
+
picker.stub(:doc => Nokogiri::HTML(input))
|
19
|
+
tc = picker.twitter_card
|
20
|
+
tc.t_name?.should eq(true)
|
21
|
+
tc.t_property?.should eq(true)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "does not include non twitter meta tags" do
|
25
|
+
input = "<meta name='foo:foo_name' content='This is foo'>><meta property='foo':foo_property' content='This is bar'>"
|
26
|
+
picker.stub(:doc => Nokogiri::HTML(input))
|
27
|
+
tc = picker.twitter_card
|
28
|
+
tc.foo_name?.should eq(false)
|
29
|
+
tc.foo_property?.should eq(false)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe "#og_data" do
|
34
|
+
it "gets all og meta tags" do
|
35
|
+
input = "<meta name='og:og_name' content='This is foo'>><meta property='og:og_property' content='This is bar'>"
|
36
|
+
picker.stub(:doc => Nokogiri::HTML(input))
|
37
|
+
og = picker.og_data
|
38
|
+
og.og_name?.should eq(true)
|
39
|
+
og.og_property?.should eq(true)
|
40
|
+
end
|
41
|
+
|
42
|
+
it "does not include non og meta tags" do
|
43
|
+
input = "<meta name='foo:foo_name' content='This is foo'>><meta property='foo':foo_property' content='This is bar'>"
|
44
|
+
picker.stub(:doc => Nokogiri::HTML(input))
|
45
|
+
og = picker.og_data
|
46
|
+
og.foo_name?.should eq(false)
|
47
|
+
og.foo_property?.should eq(false)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "#all_meta" do
|
52
|
+
it "gets all meta tags" do
|
53
|
+
input = "<meta name='foo:foo' content='This is foo'><meta property='bar:bar' content='This is bar'>"
|
54
|
+
picker.stub(:doc => Nokogiri::HTML(input))
|
55
|
+
am = picker.all_meta
|
56
|
+
am.foo_foo?.should eq(true)
|
57
|
+
am.bar_bar?.should eq(true)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
describe "live tests" do
|
62
|
+
describe "on vine" do
|
63
|
+
let(:pickerv) { MetaPicker.new("https://vine.co/v/b5pDOD23KPH") }
|
64
|
+
it "should have a title" do
|
65
|
+
pickerv.twitter_card.title.should_not be_nil
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should have a description" do
|
69
|
+
pickerv.twitter_card.description.should_not be_nil
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should be a video" do
|
73
|
+
pickerv.twitter_card.player_stream.should_not be_nil
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe "on instagram" do
|
78
|
+
let(:pickeri) { MetaPicker.new("http://instagram.com/p/bowsK3B-3H/") }
|
79
|
+
it "should have a title" do
|
80
|
+
pickeri.og_data.title.should_not be_nil
|
81
|
+
end
|
82
|
+
|
83
|
+
it "should have a description" do
|
84
|
+
pickeri.og_data.description.should_not be_nil
|
85
|
+
end
|
86
|
+
|
87
|
+
it "should be a video" do
|
88
|
+
pickeri.og_data.video.should_not be_nil
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
require 'test/unit'
|
6
|
+
require 'vcr'
|
7
|
+
require 'meta-picker'
|
8
|
+
|
9
|
+
SPEC_DIR = File.dirname(__FILE__)
|
10
|
+
require "#{SPEC_DIR}/vcr/vcr"
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
14
|
+
end
|
@@ -0,0 +1,206 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://vine.co/v/b5pDOD23KPH
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message:
|
16
|
+
headers:
|
17
|
+
accept-ranges:
|
18
|
+
- bytes
|
19
|
+
age:
|
20
|
+
- "676"
|
21
|
+
cache-control:
|
22
|
+
- max-age=1800
|
23
|
+
content-type:
|
24
|
+
- text/html; charset=utf-8
|
25
|
+
date:
|
26
|
+
- Thu, 11 Jul 2013 19:44:14 GMT
|
27
|
+
server:
|
28
|
+
- nginx/1.1.19
|
29
|
+
strict-transport-security:
|
30
|
+
- max-age=631138519
|
31
|
+
via:
|
32
|
+
- 1.1 varnish
|
33
|
+
x-cache:
|
34
|
+
- HIT
|
35
|
+
x-varnish:
|
36
|
+
- 620065453 619898669
|
37
|
+
x-xss-protection:
|
38
|
+
- 1; mode=block
|
39
|
+
content-length:
|
40
|
+
- "2383"
|
41
|
+
connection:
|
42
|
+
- Close
|
43
|
+
body:
|
44
|
+
encoding: ASCII-8BIT
|
45
|
+
string: |-
|
46
|
+
<!DOCTYPE html>
|
47
|
+
<html>
|
48
|
+
<title>Erik Jensen's post on Vine</title>
|
49
|
+
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# vine-app: http://ogp.me/ns/fb/vine-app#">
|
50
|
+
<link rel="stylesheet" type="text/css" href="https://d3422saexnbpnl.cloudfront.net/static/style.css?05142013">
|
51
|
+
<link rel="shortcut icon" type="image/png" href="/static/favicon.ico">
|
52
|
+
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="/static/style_ie7.css?011320121402" /><![endif]-->
|
53
|
+
|
54
|
+
<link href="//vjs.zencdn.net/4.0/video-js.css" rel="stylesheet">
|
55
|
+
<script src="//vjs.zencdn.net/4.0/video.js"></script>
|
56
|
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
57
|
+
|
58
|
+
<meta property="twitter:card" content="player">
|
59
|
+
<meta property="twitter:title" content="Erik Jensen's post on Vine">
|
60
|
+
<meta property="twitter:description" content="Olivia will dance to anything. Including a stuffed bear with a saxaphone.">
|
61
|
+
|
62
|
+
<meta property="twitter:image" content="https://v.cdn.vine.co/v/thumbs/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4.jpg?versionId=X_2zG5zmrNoeLU1Bv3lswAd22trQhmYu">
|
63
|
+
<meta property="twitter:site" content="@vineapp">
|
64
|
+
<meta property="twitter:player:width" content="435">
|
65
|
+
<meta property="twitter:player:height" content="435">
|
66
|
+
<meta property="twitter:player" content="https://vine.co/v/b5pDOD23KPH/card">
|
67
|
+
<meta property="twitter:player:stream" content="https://mtc.cdn.vine.co/v/videos/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4?versionId=9SxoH9b5AcS3kn22F6CTB9Tp69bVwMhm">
|
68
|
+
<meta property="twitter:player:stream:content_type" content="video/mp4; codecs="avc1.42E01E, mp4a.40.2"">
|
69
|
+
|
70
|
+
<!-- app card metadata -->
|
71
|
+
<meta property="twitter:app:name:iphone" content="Vine">
|
72
|
+
<meta property="twitter:app:url:iphone" content="vine://post/906382264605216768">
|
73
|
+
<meta property="twitter:app:id:iphone" content="592447445">
|
74
|
+
|
75
|
+
<meta property="twitter:app:name:googleplay" content="Vine">
|
76
|
+
<meta property="twitter:app:url:googleplay" content="https://vine.co/v/b5pDOD23KPH">
|
77
|
+
<meta property="twitter:app:id:googleplay" content="co.vine.android">
|
78
|
+
|
79
|
+
<meta property="og:title" content="Olivia will dance to anything. Including a stuffed bear with a saxaphone.">
|
80
|
+
<meta property="og:site_name" content="Vine">
|
81
|
+
<meta property="og:image" content="https://v.cdn.vine.co/v/thumbs/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4.jpg?versionId=X_2zG5zmrNoeLU1Bv3lswAd22trQhmYu">
|
82
|
+
<meta property="fb:app_id" content="1185475921592170">
|
83
|
+
<meta property="og:type" content="vine-app:video" />
|
84
|
+
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
|
85
|
+
<script>
|
86
|
+
$(function () {
|
87
|
+
var videoContainerSize = $('.video-container').width();
|
88
|
+
var showVolumeControl = false;
|
89
|
+
|
90
|
+
var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()))
|
91
|
+
|
92
|
+
if (videoContainerSize > 320) {
|
93
|
+
var shareTop = $('.share-page .card .user');
|
94
|
+
var shareMiddle = $('.share-page .card h1');
|
95
|
+
var shareBottom = $('.share-page .card .shot-with-vine');
|
96
|
+
|
97
|
+
showVolumeControl = true;
|
98
|
+
shareMiddle.height(600 - shareTop.outerHeight() - shareBottom.outerHeight());
|
99
|
+
}
|
100
|
+
|
101
|
+
var player = videojs('post', { 'children': { 'loadingSpinner': false, 'controlBar': false }}).ready(function () {
|
102
|
+
this.width(videoContainerSize);
|
103
|
+
this.height(videoContainerSize);
|
104
|
+
if (showVolumeControl) this.volume(0);
|
105
|
+
else $('.mute-button').remove();
|
106
|
+
this.load();
|
107
|
+
var once = false;
|
108
|
+
f = function() {
|
109
|
+
if (once) { return; }
|
110
|
+
once = true;
|
111
|
+
|
112
|
+
if (!mobile)
|
113
|
+
this.play();
|
114
|
+
};
|
115
|
+
|
116
|
+
|
117
|
+
this.on('canplaythrough', f)
|
118
|
+
this.on('canplay', f)
|
119
|
+
});
|
120
|
+
|
121
|
+
$('.mute-button').click(function (e) {
|
122
|
+
if (player.volume() == 0) {
|
123
|
+
$(e.target).removeClass('off');
|
124
|
+
$(e.target).addClass('on');
|
125
|
+
player.volume(1);
|
126
|
+
} else {
|
127
|
+
$(e.target).removeClass('on');
|
128
|
+
$(e.target).addClass('off');
|
129
|
+
player.volume(0);
|
130
|
+
}
|
131
|
+
return false;
|
132
|
+
});
|
133
|
+
|
134
|
+
$('video').click(function () {
|
135
|
+
if (player.paused())
|
136
|
+
player.play()
|
137
|
+
else
|
138
|
+
player.pause()
|
139
|
+
});
|
140
|
+
});
|
141
|
+
</script>
|
142
|
+
|
143
|
+
<script type="text/javascript">
|
144
|
+
|
145
|
+
var _gaq = _gaq || [];
|
146
|
+
_gaq.push(['_setAccount', 'UA-34240974-1']);
|
147
|
+
_gaq.push(['_setDomainName', 'vine.co']);
|
148
|
+
_gaq.push(['_trackPageview']);
|
149
|
+
|
150
|
+
(function() {
|
151
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
152
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
153
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
154
|
+
})();
|
155
|
+
|
156
|
+
</script>
|
157
|
+
</head>
|
158
|
+
|
159
|
+
<body class="share-page">
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
<div class="card">
|
164
|
+
<div class="video-container">
|
165
|
+
<a href="#" class="mute-button off"></a>
|
166
|
+
<video id="post" class="video-js vjs-default-skin" loop preload="auto" poster="https://v.cdn.vine.co/v/thumbs/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4.jpg?versionId=X_2zG5zmrNoeLU1Bv3lswAd22trQhmYu">
|
167
|
+
<source src="https://mtc.cdn.vine.co/v/videos/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4?versionId=9SxoH9b5AcS3kn22F6CTB9Tp69bVwMhm" type="video/mp4">
|
168
|
+
</video>
|
169
|
+
</div>
|
170
|
+
<div class="info">
|
171
|
+
<div class="user">
|
172
|
+
<img src="https://v.cdn.vine.co/v/avatars/03128FE6-0FE8-472E-9DDB-5705669C875A-6444-0000066C96C6505F.jpg?versionId=9Ysh7CYh0U9gPLqU52Aw_HieG_lvLze7" class="avatar">
|
173
|
+
<h2>Erik Jensen</h2>
|
174
|
+
</div>
|
175
|
+
<h1>
|
176
|
+
<div class="inner">
|
177
|
+
<p>Olivia will dance to anything. Including a stuffed bear with a saxaphone.</p>
|
178
|
+
</div>
|
179
|
+
</h1>
|
180
|
+
<div class="shot-with-vine">
|
181
|
+
<img src="https://d3422saexnbpnl.cloudfront.net/static/images/shot_with_vine.png" width="171" height="30">
|
182
|
+
<a class="action-button" href="/">Download App</a>
|
183
|
+
</div>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
<div class="share-options hide-mobile">
|
187
|
+
<div class="pill">
|
188
|
+
<div class="embed">
|
189
|
+
<a href="/v/b5pDOD23KPH/embed">
|
190
|
+
<img src="https://d3422saexnbpnl.cloudfront.net/static/images/embed_button_2x.png" width="69" height="20">
|
191
|
+
</a>
|
192
|
+
</div>
|
193
|
+
<div class="twitter">
|
194
|
+
<!-- data-count="none" -->
|
195
|
+
<a href="https://twitter.com/share" class="twitter-share-button" style="display: none;" data-lang="en">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
</div>
|
201
|
+
|
202
|
+
</body>
|
203
|
+
</html>
|
204
|
+
http_version:
|
205
|
+
recorded_at: Thu, 11 Jul 2013 19:44:14 GMT
|
206
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,206 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://vine.co/v/b5pDOD23KPH
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message:
|
16
|
+
headers:
|
17
|
+
accept-ranges:
|
18
|
+
- bytes
|
19
|
+
age:
|
20
|
+
- "676"
|
21
|
+
cache-control:
|
22
|
+
- max-age=1800
|
23
|
+
content-type:
|
24
|
+
- text/html; charset=utf-8
|
25
|
+
date:
|
26
|
+
- Thu, 11 Jul 2013 19:44:13 GMT
|
27
|
+
server:
|
28
|
+
- nginx/1.1.19
|
29
|
+
strict-transport-security:
|
30
|
+
- max-age=631138519
|
31
|
+
via:
|
32
|
+
- 1.1 varnish
|
33
|
+
x-cache:
|
34
|
+
- HIT
|
35
|
+
x-varnish:
|
36
|
+
- 620065237 619898669
|
37
|
+
x-xss-protection:
|
38
|
+
- 1; mode=block
|
39
|
+
content-length:
|
40
|
+
- "2383"
|
41
|
+
connection:
|
42
|
+
- Close
|
43
|
+
body:
|
44
|
+
encoding: ASCII-8BIT
|
45
|
+
string: |-
|
46
|
+
<!DOCTYPE html>
|
47
|
+
<html>
|
48
|
+
<title>Erik Jensen's post on Vine</title>
|
49
|
+
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# vine-app: http://ogp.me/ns/fb/vine-app#">
|
50
|
+
<link rel="stylesheet" type="text/css" href="https://d3422saexnbpnl.cloudfront.net/static/style.css?05142013">
|
51
|
+
<link rel="shortcut icon" type="image/png" href="/static/favicon.ico">
|
52
|
+
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="/static/style_ie7.css?011320121402" /><![endif]-->
|
53
|
+
|
54
|
+
<link href="//vjs.zencdn.net/4.0/video-js.css" rel="stylesheet">
|
55
|
+
<script src="//vjs.zencdn.net/4.0/video.js"></script>
|
56
|
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
57
|
+
|
58
|
+
<meta property="twitter:card" content="player">
|
59
|
+
<meta property="twitter:title" content="Erik Jensen's post on Vine">
|
60
|
+
<meta property="twitter:description" content="Olivia will dance to anything. Including a stuffed bear with a saxaphone.">
|
61
|
+
|
62
|
+
<meta property="twitter:image" content="https://v.cdn.vine.co/v/thumbs/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4.jpg?versionId=X_2zG5zmrNoeLU1Bv3lswAd22trQhmYu">
|
63
|
+
<meta property="twitter:site" content="@vineapp">
|
64
|
+
<meta property="twitter:player:width" content="435">
|
65
|
+
<meta property="twitter:player:height" content="435">
|
66
|
+
<meta property="twitter:player" content="https://vine.co/v/b5pDOD23KPH/card">
|
67
|
+
<meta property="twitter:player:stream" content="https://mtc.cdn.vine.co/v/videos/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4?versionId=9SxoH9b5AcS3kn22F6CTB9Tp69bVwMhm">
|
68
|
+
<meta property="twitter:player:stream:content_type" content="video/mp4; codecs="avc1.42E01E, mp4a.40.2"">
|
69
|
+
|
70
|
+
<!-- app card metadata -->
|
71
|
+
<meta property="twitter:app:name:iphone" content="Vine">
|
72
|
+
<meta property="twitter:app:url:iphone" content="vine://post/906382264605216768">
|
73
|
+
<meta property="twitter:app:id:iphone" content="592447445">
|
74
|
+
|
75
|
+
<meta property="twitter:app:name:googleplay" content="Vine">
|
76
|
+
<meta property="twitter:app:url:googleplay" content="https://vine.co/v/b5pDOD23KPH">
|
77
|
+
<meta property="twitter:app:id:googleplay" content="co.vine.android">
|
78
|
+
|
79
|
+
<meta property="og:title" content="Olivia will dance to anything. Including a stuffed bear with a saxaphone.">
|
80
|
+
<meta property="og:site_name" content="Vine">
|
81
|
+
<meta property="og:image" content="https://v.cdn.vine.co/v/thumbs/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4.jpg?versionId=X_2zG5zmrNoeLU1Bv3lswAd22trQhmYu">
|
82
|
+
<meta property="fb:app_id" content="1185475921592170">
|
83
|
+
<meta property="og:type" content="vine-app:video" />
|
84
|
+
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
|
85
|
+
<script>
|
86
|
+
$(function () {
|
87
|
+
var videoContainerSize = $('.video-container').width();
|
88
|
+
var showVolumeControl = false;
|
89
|
+
|
90
|
+
var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()))
|
91
|
+
|
92
|
+
if (videoContainerSize > 320) {
|
93
|
+
var shareTop = $('.share-page .card .user');
|
94
|
+
var shareMiddle = $('.share-page .card h1');
|
95
|
+
var shareBottom = $('.share-page .card .shot-with-vine');
|
96
|
+
|
97
|
+
showVolumeControl = true;
|
98
|
+
shareMiddle.height(600 - shareTop.outerHeight() - shareBottom.outerHeight());
|
99
|
+
}
|
100
|
+
|
101
|
+
var player = videojs('post', { 'children': { 'loadingSpinner': false, 'controlBar': false }}).ready(function () {
|
102
|
+
this.width(videoContainerSize);
|
103
|
+
this.height(videoContainerSize);
|
104
|
+
if (showVolumeControl) this.volume(0);
|
105
|
+
else $('.mute-button').remove();
|
106
|
+
this.load();
|
107
|
+
var once = false;
|
108
|
+
f = function() {
|
109
|
+
if (once) { return; }
|
110
|
+
once = true;
|
111
|
+
|
112
|
+
if (!mobile)
|
113
|
+
this.play();
|
114
|
+
};
|
115
|
+
|
116
|
+
|
117
|
+
this.on('canplaythrough', f)
|
118
|
+
this.on('canplay', f)
|
119
|
+
});
|
120
|
+
|
121
|
+
$('.mute-button').click(function (e) {
|
122
|
+
if (player.volume() == 0) {
|
123
|
+
$(e.target).removeClass('off');
|
124
|
+
$(e.target).addClass('on');
|
125
|
+
player.volume(1);
|
126
|
+
} else {
|
127
|
+
$(e.target).removeClass('on');
|
128
|
+
$(e.target).addClass('off');
|
129
|
+
player.volume(0);
|
130
|
+
}
|
131
|
+
return false;
|
132
|
+
});
|
133
|
+
|
134
|
+
$('video').click(function () {
|
135
|
+
if (player.paused())
|
136
|
+
player.play()
|
137
|
+
else
|
138
|
+
player.pause()
|
139
|
+
});
|
140
|
+
});
|
141
|
+
</script>
|
142
|
+
|
143
|
+
<script type="text/javascript">
|
144
|
+
|
145
|
+
var _gaq = _gaq || [];
|
146
|
+
_gaq.push(['_setAccount', 'UA-34240974-1']);
|
147
|
+
_gaq.push(['_setDomainName', 'vine.co']);
|
148
|
+
_gaq.push(['_trackPageview']);
|
149
|
+
|
150
|
+
(function() {
|
151
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
152
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
153
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
154
|
+
})();
|
155
|
+
|
156
|
+
</script>
|
157
|
+
</head>
|
158
|
+
|
159
|
+
<body class="share-page">
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
<div class="card">
|
164
|
+
<div class="video-container">
|
165
|
+
<a href="#" class="mute-button off"></a>
|
166
|
+
<video id="post" class="video-js vjs-default-skin" loop preload="auto" poster="https://v.cdn.vine.co/v/thumbs/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4.jpg?versionId=X_2zG5zmrNoeLU1Bv3lswAd22trQhmYu">
|
167
|
+
<source src="https://mtc.cdn.vine.co/v/videos/DDD0C9B2-5D31-4F73-BEF0-7F20C0E1AEF4-6611-000006D0E857E217_1.0.1.mp4?versionId=9SxoH9b5AcS3kn22F6CTB9Tp69bVwMhm" type="video/mp4">
|
168
|
+
</video>
|
169
|
+
</div>
|
170
|
+
<div class="info">
|
171
|
+
<div class="user">
|
172
|
+
<img src="https://v.cdn.vine.co/v/avatars/03128FE6-0FE8-472E-9DDB-5705669C875A-6444-0000066C96C6505F.jpg?versionId=9Ysh7CYh0U9gPLqU52Aw_HieG_lvLze7" class="avatar">
|
173
|
+
<h2>Erik Jensen</h2>
|
174
|
+
</div>
|
175
|
+
<h1>
|
176
|
+
<div class="inner">
|
177
|
+
<p>Olivia will dance to anything. Including a stuffed bear with a saxaphone.</p>
|
178
|
+
</div>
|
179
|
+
</h1>
|
180
|
+
<div class="shot-with-vine">
|
181
|
+
<img src="https://d3422saexnbpnl.cloudfront.net/static/images/shot_with_vine.png" width="171" height="30">
|
182
|
+
<a class="action-button" href="/">Download App</a>
|
183
|
+
</div>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
<div class="share-options hide-mobile">
|
187
|
+
<div class="pill">
|
188
|
+
<div class="embed">
|
189
|
+
<a href="/v/b5pDOD23KPH/embed">
|
190
|
+
<img src="https://d3422saexnbpnl.cloudfront.net/static/images/embed_button_2x.png" width="69" height="20">
|
191
|
+
</a>
|
192
|
+
</div>
|
193
|
+
<div class="twitter">
|
194
|
+
<!-- data-count="none" -->
|
195
|
+
<a href="https://twitter.com/share" class="twitter-share-button" style="display: none;" data-lang="en">Tweet</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
</div>
|
201
|
+
|
202
|
+
</body>
|
203
|
+
</html>
|
204
|
+
http_version:
|
205
|
+
recorded_at: Thu, 11 Jul 2013 19:44:13 GMT
|
206
|
+
recorded_with: VCR 2.5.0
|