well plugin is broken
finally got my device hooked back up, and besides the simple changes and little debugging planned
I found imdb has made yet another change to there website
I've made the necessary changes to get the to the following example output
- Code: Select all
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://i.media-imdb.com/images/SFc38115626995b37cfa0a6e2ae98fe2d7/css/min/imdb-video-player.css" >
</head>
<body id="imdb-player">
<div style="display: none">
<img src="/video/imdb/vi1681366553/metrics?state=present">
</div>
<!-- setting a script tag with unknown type allows it to be ignored by js parser -->
<script class="imdb-player-data" type="text/imdb-video-player-json">
{
"playerType" : "single",
"videoPlayerObject" : {"video":{"provider":"video","width":"854","cdn":"cf","slate":"http://ia.media-imdb.com/images/M/MV5BMTQwNzI4MDUzN15BMl5BanBnXkFtZTcwNjE4MDIwNw@@._V1_.jpg","height":"480","callback":"/video/imdb/vi1681366553/metrics_720p","url":"http://video-http.media-imdb.com/MV5BMjI2NDU2NzgxMF5BMTFeQW1wNF5BbWU3MDAwODAyMDc@.mp4?Expires=1357302721&Signature=Q2C~rliGOgfpj1h~XURvwzW4qVkjPC~l7IcJjM2xyDBKBwIgqdZfc0XksnOIkmOeMXZM-a4I6xd1SUIr20u9g6h57XGs6aB41bdSgRluz2o5vK6IHzJ~B6WGBhhvvStwRTefLhQgTOeodEYzE68jHargaPYVl6VXbomleAXKCLg_&Key-Pair-Id=APKAILW5I44IHKUN2DYA&hint=flv","viconst":"vi1681366553","id":null,"label":"720p"}},
"rhsObject" : {"wl_btn_listener_options":{"hasWatchlist":false,"confirmAccount":false,"doLogin":true},"xsrf":{"xsrfFieldname":"49e6c","xsrfToken":"81d2"},"tconst":"tt1232829","title_display":"21 Jump Street (2012)","poster":{"width":"122","tconst":"tt1232829","image_url":"http://ia.media-imdb.com/images/M/MV5BMTc3NzQ3OTg3NF5BMl5BanBnXkFtZTcwMjk5OTcxNw@@._V1._SX122_CR0,0,122,176_.jpg","height":"176"}}, "titleObject" : {"tconst":"tt1232829","share":{"email":"?subject=Watch%20this%20video%20from%2021%20Jump%20Street%20on%20IMDb&body=http://www.imdb.com/rg/s/4/title/tt1232829/%23lb-vi1681366553","twitter":{"width":"815","url":"http://twitter.com/home?status=21%20Jump%20Street%20-%20http%3A%2F%2Fwww.imdb.com%2Frg%2Fs%2F1%2Ftitle%2Ftt1232829%2F%23lb-vi1681366553","description":"Share on Twitter","height":"436"},"facebook":{"width":"626","url":"http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.imdb.com%2Frg%2Fs%2F3%2Ftitle%2Ftt1232829%2F%23lb-vi1681366553","description":"Share on Facebook","height":"436"},"comments":{"url":"/video/imdb/vi1681366553/?stop=1#discuss"}},"title":{"listtotal":null,"listindex":null,"context":"imdb","viconst":"vi1681366553","title":"No. 1","duration":"2:33"},"token":"tdtBobjnL9EJkD_2BMb6vsWKuNfl0I_2FuLR9RwpTyEPjx8_3D","encoding":{"240p":"Standard","720p":" <img src=\"http://i.media-imdb.com/images/SFfaea74d6edd360e2dc74f4381d593d35/css2/app/video/images/hd_icon_white.png\" width=\"18\" />","selected":"720p","480p":"480p"}},
"adObject" : {"plugins":{"/images/ova/ova-jw.min.js":{"ads":{"skipAd":{"enabled":false},"schedule":[{"position":"pre-roll","server":{"forceImpressionServing":true,"dart_params":"imdb2.consumer.video/imdbvideo;sz=3x3;dcmt=text/xml;ct=com;id=tt1232829;ml=R;g=co;tt=f;mh=R;g=cr;g=ac;id=vi1681366553;m=R;b=t250a;vct=sh;g=brc;b=skyyact;g=baa;vct=tr;k=t;k=c;coo=usa;b=skyyco;b=pchoice;bpx=1;ab=e;ka=0;[PLAYLISTINDEX];[PLAYERTYPE];[PLAYLISTID];[PASEGMENTS];ord=[CLIENT_SIDE_ORD]"}}]},"autoPlay":true,"autoPlayOnExternalLoad":true,"debug":{"levels":"fatal"},"canFireEventAPICalls":true}},"listindex":null}
}
</script>
<script src="http://i.media-imdb.com/images/SF539be3987208630802e712857c51a6c9/js/jquery.js" ></script><script src="http://i.media-imdb.com/images/SF445483c4f0a966b62895f5a28ba98bbd/js/jwplayer/5.9/jwplayer.js" ></script><script src="http://i.media-imdb.com/images/SF66d41ec7090bbdde87e09a309dea6661/js/swfobject/1.5.js" ></script><script src="http://i.media-imdb.com/images/SFb762c590afd141254ab36f8212ac0f29/js/jquery/ui-current-custom.js" ></script><script src="http://i.media-imdb.com/images/SF979bdfd0fbb3f24d05d47bf9fcea6aab/js/cc/flash_detect.js" ></script><script src="http://i.media-imdb.com/images/SF91abb9e671b7ba783cea7c22bdc1274f/js/cc/video/imdb-video-player.js" ></script>
</body>
</html>
and I'm currently stuck, previously I was using a regex which mad_ady provided to extract the real url
this page is substantially different
anybody know how to craft a regex to grab anything
after "url":"
beggining with http
and before the next occurance of ","
and yes, I'd assume, we'll need to escape all of the quotes
or the alternative I can think of
does anybody know how to extract the entire embedded json from this html
once extract, I could walk through, just like the other json responses