mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Facebook scraper requires protocol (e.g. http) on og:image meta tags.
This commit is contained in:
parent
d87c5e2efa
commit
7d5d1a12ad
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ function getEmbedlyData(url) {
|
|||
var data = {};
|
||||
var extractBase = 'http://api.embed.ly/1/extract';
|
||||
var embedlyKey = getSetting('embedlyKey');
|
||||
// 200 x 200 is the minimum size accepted by facebook
|
||||
// 200 x 200 is the minimum size accepted by facebook
|
||||
var thumbnailWidth = getSetting('thumbnailWidth', 200);
|
||||
var thumbnailHeight = getSetting('thumbnailHeight', 200);
|
||||
|
||||
|
@ -30,7 +30,7 @@ function getEmbedlyData(url) {
|
|||
// console.log(result)
|
||||
|
||||
if (!!result.data.images && !!result.data.images.length) // there may not always be an image
|
||||
result.data.thumbnailUrl = result.data.images[0].url.replace("http:", ""); // add thumbnailUrl as its own property and remove "http"
|
||||
result.data.thumbnailUrl = result.data.images[0].url // add thumbnailUrl as its own property and leave "http" in, Facebook scraper won't accept it as valid otherwise
|
||||
|
||||
if (result.data.authors && result.data.authors.length > 0) {
|
||||
result.data.sourceName = result.data.authors[0].name;
|
||||
|
|
Loading…
Add table
Reference in a new issue