justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 379 forks source link

Facebook Unable to Scrape #537

Open RyuuOujiXS opened 8 years ago

RyuuOujiXS commented 8 years ago

URL being Scraped: twitch.tv/RyuuOujiXS Resulting Error:

  • Errors That Must Be Fixed
  • - Object Invalid Value
  • - - Object at URL 'https://www.twitch.tv/ryuuoujixs' of type 'video.other' is invalid because the given value 'id460177396' for property 'al:ios:app_store_id' could not be parsed as type 'integer'.

For some reason, Facebook is seeing:

<meta content="app-id=460177396, app-argument=twitch://open" name="apple-itunes-app" />
<meta content="Twitch" name="description" />
<meta content="restricted" name="rating" />
<meta content="nfsZd38ZV83T6MdjAsLhwdcQHPT3HkidcTELZkVxE3k" name="google-site-verification" />
<meta content="Twitch" property="og:site_name" />
<meta content="161273083968709" property="fb:app_id" />
<meta content="RyuuOujiXS - Twitch" property="og:title" />
<meta content="[EN] SETTINGS TEST! Bit Squad LIVE!" property="og:description" />
<meta content="https://static-cdn.jtvnw.net/jtv_user_pictures/ryuuoujixs-profile_image-40d2cab7ed6c2ff1-300x300.png" property="og:image" />
<meta property="og:url" content="https://www.twitch.tv/ryuuoujixs" />
<meta content="video.other" property="og:type" />
<meta content="https://www.twitch.tv/widgets/live_embed_player.swf?channel=ryuuoujixs" property="og:video" />
<meta content="https://www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf?playerType=facebook&channel=ryuuoujixs" property="og:video:secure_url" />
<meta content="application/x-shockwave-flash" property="og:video:type" />
<meta content="378" property="og:video:height" />
<meta content="620" property="og:video:width" />
<meta content="!" name="fragment" />
<meta property="al:ios:url" content="twitch://stream/ryuuoujixs" />
<meta property="al:ios:app_store_id" content="id460177396" />
<meta property="al:ios:app_name" content="Twitch" />
<meta property="al:android:package" content="tv.twitch.android.app" />
<meta property="al:android:app_name" content="Twitch" />
<meta property="twitter:card" content="summary" />
<meta property="twitter:app:name:googleplay" content="Twitch" />
<meta property="twitter:app:id:googleplay" content="tv.twitch.android.app" />
<meta property="twitter:app:name:iphone" content="Twitch" />
<meta property="twitter:app:id:iphone" content="id460177396" />
<meta property="twitter:app:url:iphone" content="twitch://stream/ryuuoujixs" />
<meta property="twitter:app:name:ipad" content="Twitch" />
<meta property="twitter:app:id:ipad" content="id460177396" />
<meta property="twitter:app:url:ipad" content="twitch://stream/ryuuoujixs" />

...while Twitch's Source Code of the page I'm scraping shows:

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Twitch</title>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
<meta content='app-id=460177396, app-argument=twitch://open' name='apple-itunes-app'>
<meta content='Twitch' name='description'>
<link href='/open12.php?u=9GE4D0MFNIp6MEXeVs3DJ8oAdJeaPLc0e42kWXc%3D&amp;b=29' rel='shortcut icon' type='image/x-icon'>
<meta content='restricted' name='rating'>
<link href='/open12.php?u=9GE4D0MFNIp6MEXeVs3DJ8oAc5iIJ7sycY6sSmjxaleAnRxE%2BM2vw%2BmLk0R1W7E4f8tEfSREp1LXXEINH4fRCygNQkxFmqmyqX2JSkxnsQlPWFLA&amp;b=29' rel='alternate'>
<link href='/open12.php?u=9GE4D0MFNIp6MEXeVs3DJ8oAe5mfeLUrZZniFSz9dUnD3AEJuYuv1%2BjRkUI%2BSrYwdYtAYXsZqlDLR1QPWZDS&amp;b=29' rel='alternate'>
<meta content='nfsZd38ZV83T6MdjAsLhwdcQHPT3HkidcTELZkVxE3k' name='google-site-verification'>
<link href='/open12.php?u=9GE4D0QeNtcgIEPFUsmIfd9Af9ndZOFvI5D8Ci7zdknM3AIHv5fvk7A%3D&amp;b=29' rel='publisher'>
<meta content='Twitch' property='og:site_name'>
<meta content='161273083968709' property='fb:app_id'>
<meta content='RyuuOujiXS' property='og:title'>
<meta content='[EN] SHMUNDAY GOODNESS! Bit Squad LIVE!' property='og:description'>
<meta content='/jtv_user_pictures/ryuuoujixs-profile_image-24806139b7e6a9e1-600x600.png' property='og:image'>
<meta property='og:url'>
<meta content='video.other' property='og:type'>
<meta content='/swflibs/TwitchPlayer.swf?channel=ryuuoujixs&playerType=facebook' property='og:video'>
<meta content='/swflibs/TwitchPlayer.swf?channel=ryuuoujixs&playerType=facebook' property='og:video:secure_url'>
<meta content='application/x-shockwave-flash' property='og:video:type'>
<meta content='378' property='og:video:height'>
<meta content='620' property='og:video:width'>
<link href="/open12.php?u=9GE4D0MXIYltI0KEQdGbPcsBfJOYeqcvbM%2BoSTeqNQiYglFR%2B820zq%2FGgVk%3D&amp;b=29" media="screen" rel="stylesheet" type="text/css" />
<meta content='!' name='fragment' />
ghost commented 8 years ago

<meta property="al:ios:app_store_id" content="id460177396" /> is not an integer for facebook, (content= should be just the numeric value, no 'id') --> <meta content='app-id=460177396, app-argument=twitch://open' name='apple-itunes-app'> Is what it should probably be getting.

Who is responsible for fixing it? Shrug :D Just pointing out the relevant bit in your blob of text.

RyuuOujiXS commented 8 years ago

@TournyMasterBotCurse Thanks for that. I just didn't want to leave anything out, just in case it'd help find a solution faster. To expand on your reply, the ID comes up 4 times in Facebook's scrape, as per below:

<meta content="app-id=460177396, app-argument=twitch://open" name="apple-itunes-app" />
<meta property="al:ios:app_store_id" content="id460177396" />
<meta property="twitter:app:id:iphone" content="id460177396" />
<meta property="twitter:app:id:ipad" content="id460177396" />

...while it only comes up once in the Source Code, as per below: <meta content='app-id=460177396, app-argument=twitch://open' name='apple-itunes-app'>