-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching support for preview #97
Changes from all commits
d286ed4
c46d57e
444754e
f40bb9f
009e7d9
3d0d97b
7fda729
99dfa9c
aff39d1
9cd0271
d2e2cfc
0f90283
0c5ca4d
cb66506
f604541
4212198
a65ad03
1ad1ad7
f4682b2
a7bbed6
b17ac63
86493a7
13bc0ce
d2fd84b
a286ebd
99478c3
8dfc5be
916bdde
0dfc853
6c0b665
332ebd7
2633b78
41239f5
86e40bc
186ed3f
ce24a3a
3f898ee
559abf3
61015f4
f2b2269
d775c13
b3f71f0
183b4c1
9ec66d5
542e5c0
d9d3946
60c6287
0e515a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,13 @@ class BliptvOnebox | |
|
||
private | ||
|
||
def extracted_data | ||
def data | ||
{ | ||
url: @url, | ||
title: @body.title, | ||
image: @body.images[0], | ||
description: @body.description, | ||
video: @body.metadata[:video].first[:_value] | ||
title: raw.title, | ||
image: raw.images.first, | ||
description: raw.description, | ||
video: raw.metadata[:video].first[:_value] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the way we want to get to this data? |
||
} | ||
end | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,13 @@ class CollegeHumorOnebox | |
|
||
private | ||
|
||
def extracted_data | ||
def data | ||
{ | ||
url: @url, | ||
title: @body.title, | ||
image: @body.images[0], | ||
description: @body.description, | ||
video: @body.metadata[:video].first[:_value] | ||
title: raw.title, | ||
image: raw.images.first, | ||
description: raw.description, | ||
video: raw.metadata[:video].first[:_value] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be how we get to this data? |
||
} | ||
end | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,13 @@ class DailymotionOnebox | |
|
||
private | ||
|
||
def extracted_data | ||
def data | ||
{ | ||
url: @url, | ||
title: @body.title, | ||
image: @body.images.first, | ||
description: @body.description, | ||
video: @body.metadata[:video][1][:_value] | ||
title: raw.title, | ||
image: raw.images.first, | ||
description: raw.description, | ||
video: raw.metadata[:video][1][:_value] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure this is the way to do this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, so it's a link to the video directly? And good point, make a new issue for that and mark it for Milestone 1.2. We'll need a template and a module that people can use to start using that template. Should also lead into the idea of having a default template. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's a direct video link. Ok got it |
||
} | ||
end | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Onebox | ||
module Engine | ||
module HTML | ||
private | ||
|
||
def raw | ||
@raw ||= Nokogiri::HTML(open(@url)) | ||
end | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write some documentation above this method.