Closed brenc closed 5 years ago
If the data structure changed I'd of thought i'd have made it a major release but perhaps not if you are correct. I'll look into a changelog for future releases.
I'm a bit confused. It looks like the resulting unfurl output changed considerably between 1.x and 3.x. Here is the unfurl data for https://www.youtube.com/watch?v=pvYOSuz8yG4.
unfurl.js@1.1.7:
{ other:
{ wwwCore: '/yts/cssbin/www-core-vflHfQgzk.css',
playerWwwPlayer: '/yts/cssbin/player-vflC8Z12p/www-player.css',
wwwPageframe: '/yts/cssbin/www-pageframe-vfl2QekqP.css',
title: 'Bobby Brown - Roni',
canonical: 'https://www.youtube.com/watch?v=pvYOSuz8yG4',
alternate: 'http://www.youtube.com/oembed?format=xml&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpvYOSuz8yG4',
description: 'Bobby Brown "Roni" MCA Records (1988)',
keywords: 'Bobby, Brown, Roni',
manifest: '/manifest.json',
shortlink: 'https://youtu.be/pvYOSuz8yG4',
search: 'https://www.youtube.com/opensearch?locale=en_US',
shortcutIcon: 'https://s.ytimg.com/yts/img/favicon-vfl8qSV2F.ico',
icon: '/yts/img/favicon_144-vfliLAfaB.png',
themeColor: '#ff0000',
alIosAppStoreId: '544007664',
alIosAppName: 'YouTube',
alIosUrl: 'vnd.youtube://www.youtube.com/watch?v=pvYOSuz8yG4&feature=applinks',
alAndroidUrl: 'vnd.youtube://www.youtube.com/watch?v=pvYOSuz8yG4&feature=applinks',
alAndroidAppName: 'YouTube',
alAndroidPackage: 'com.google.android.youtube',
alWebUrl: 'https://www.youtube.com/watch?v=pvYOSuz8yG4&feature=applinks',
fbAppId: '87741124305' },
oembed:
{ html: '<iframe width="480" height="270" src="https://www.youtube.com/embed/pvYOSuz8yG4?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
thumbnailWidth: 480,
type: 'video',
thumbnailUrl: 'https://i.ytimg.com/vi/pvYOSuz8yG4/hqdefault.jpg',
title: 'Bobby Brown - Roni',
providerName: 'YouTube',
thumbnailHeight: 360,
height: 270,
authorName: 'Preserve',
providerUrl: 'https://www.youtube.com/',
version: '1.0',
width: 480,
authorUrl: 'https://www.youtube.com/user/ThrowBackCentral' },
ogp:
{ ogSiteName: 'YouTube',
ogUrl: 'https://www.youtube.com/watch?v=pvYOSuz8yG4',
ogTitle: 'Bobby Brown - Roni',
ogImage: [ [Object] ],
ogDescription: 'Bobby Brown "Roni" MCA Records (1988)',
ogType: 'video.other',
ogVideo: [ [Object], [Object], [Object], [Object] ] },
twitter:
{ twitterCard: 'player',
twitterSite: '@youtube',
twitterUrl: 'https://www.youtube.com/watch?v=pvYOSuz8yG4',
twitterTitle: 'Bobby Brown - Roni',
twitterDescription: 'Bobby Brown "Roni" MCA Records (1988)',
twitterImage: [ [Object] ],
twitterAppNameIphone: 'YouTube',
twitterAppIdIphone: '544007664',
twitterAppNameIpad: 'YouTube',
twitterAppIdIpad: '544007664',
twitterAppUrlIphone: 'vnd.youtube://www.youtube.com/watch?v=pvYOSuz8yG4&feature=applinks',
twitterAppUrlIpad: 'vnd.youtube://www.youtube.com/watch?v=pvYOSuz8yG4&feature=applinks',
twitterAppNameGoogleplay: 'YouTube',
twitterAppIdGoogleplay: 'com.google.android.youtube',
twitterAppUrlGoogleplay: 'https://www.youtube.com/watch?v=pvYOSuz8yG4',
twitterPlayer: [ [Object] ] } }
unfurl.js@3.0.1:
{ title: 'Bobby Brown - Roni - YouTube',
description: 'Bobby Brown "Roni" MCA Records (1988)',
keywords: [ 'Bobby', 'Brown', 'Roni' ],
open_graph:
{ site_name: 'YouTube',
url: 'https://www.youtube.com/watch?v=pvYOSuz8yG4',
title: 'Bobby Brown - Roni',
images: [ [Object] ],
description: 'Bobby Brown "Roni" MCA Records (1988)',
type: 'video.other',
videos: [ [Object], [Object] ] },
twitter_card:
{ card: 'player',
site: '@youtube',
url: 'https://www.youtube.com/watch?v=pvYOSuz8yG4',
title: 'Bobby Brown - Roni',
description: 'Bobby Brown "Roni" MCA Records (1988)',
images: [ [Object] ],
apps: { iphone: [Object], ipad: [Object], googleplay: [Object] },
players: [ [Object] ] },
favicon: 'https://www.youtube.com/yts/img/favicon_144-vfliLAfaB.png',
oEmbed:
{ title: 'Bobby Brown - Roni',
html: '<iframe width="480" height="270" src="https://www.youtube.com/embed/pvYOSuz8yG4?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
provider_name: 'YouTube',
version: '1.0',
thumbnails: [ [Object] ],
width: 480,
author_name: 'Preserve',
author_url: 'https://www.youtube.com/user/ThrowBackCentral',
type: 'video',
provider_url: 'https://www.youtube.com/',
height: 270 } }
So upgrading to 3.x broke my app of course.
Hence it being a major release.
Oh gotcha. Thanks.
Was canonical
intentionally dropped?
Unintentionally. Looks like the other
section was dropped (which would have caught canonical
and any other metadata). I think adding canonical
is a good idea.
Great project! Just looking at upgrading from 1.x to 3 and I see the data structure has changed. Is there a changelog somewhere I'm missing? If not, the releases feature on here is really handy for logging all that. I'm having to go through, compare, and change code manually. Not a huge deal but it would be nice to have a changelog.