boxee :: forums  

Go Back   boxee :: forums > boxee community > announcements

Reply
 
Thread Tools Display Modes
  #1  
Old November 18th, 2010, 10:38 PM
jzongker jzongker is offline
Junior Member
 
Join Date: Nov 2010
Posts: 5
Default How to Get Hulu Working Again

Update: See post #4 for an easier method. For those who don't wish to register to download the file, AaronBBrown has posted it on his blog with some additional instructions.

Does not work with Boxee Box.


This is definitely more of a patch to get you by than an actual fix, but I was able to get Hulu working on Boxee (beta) again and wanted to share how. Whenever you launch a Hulu video Boxee makes a request to a control script like the following:

http://dir.boxee.tv/apps/helper2/?v=...20HTTP/1.1\r\n

Within that control script is the following function:

Quote:
boxee.onInit = function() {
browser.setConfigChar('general.useragent.override' ,'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.9 (KHTML, like Gecko) Boxee/0.9.23');
}
This line is overriding the user agent the browser sends in order to identify itself as Boxee, which is what Hulu is picking up on in order to block the content. To unblock it you just need to swap out this value with that of another browser, such as Chrome.

I'm sure there's more than one way to do this, but the technique I used was creating a one page website on another machine that contains a file to answer for /apps/helper2/ . The code on this page grabs whatever parameters were passed and fetches the contents of that page from dir.boxee.tv. Then it does a replace on the user agent and outputs the results.

On the machine hosting Boxee, I changed the hosts file to point dir.boxee.tv to my other machine that relays the modified javascript. Hulu recognizes Boxee as Chrome now and serves the video.

Here is the code I'm using. It's ASP.NET, but should be simple enough in any programming language.

Quote:
protected void Page_Load(object sender, EventArgs e)
{
string oldAgent="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.9 (KHTML, like Gecko) Boxee/0.9.23";
string newAgent="Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/540.0 (KHTML, like Gecko) Ubuntu/10.10 Chrome/9.1.0.0 Safari/540.0";

string url = Request.Url.PathAndQuery;
string js = GetUrlContents("http://dir.boxee.tv" + url);
string result = js.Replace(oldAgent, newAgent);
Response.Write(result);
Response.End();
}

public static string GetUrlContents(string url)
{
System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.HttpWebReque st.Create(url);
System.Net.WebResponse resp = req.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());
string result = sr.ReadToEnd();
return result;
}

Last edited by jzongker; November 23rd, 2010 at 10:12 PM. Reason: Updated instructions
Reply With Quote
  #2  
Old November 19th, 2010, 01:47 AM
PrescottX PrescottX is offline
Junior Member
 
Join Date: Nov 2010
Posts: 6
Default

I wish I was as smart as you... but I'm just not.
Reply With Quote
  #3  
Old November 19th, 2010, 08:08 AM
xmcnuggetx xmcnuggetx is offline
Senior Member
 
Join Date: Feb 2009
Posts: 259
Default

you might be able to just create a local hulu.js using the instructions here:
http://developer.boxee.tv/JavaScript_API#local

(not sure boxee wants these talks going on here though )
Reply With Quote
  #4  
Old November 19th, 2010, 09:28 AM
jzongker jzongker is offline
Junior Member
 
Join Date: Nov 2010
Posts: 5
Default

You're absolutely right xmcnuggetx, I was making this harder than necessary. Just save the attached file as [Boxeepath]/system/players/flashplayer/hulu.js and it'll do the same thing.

I haven't tried yet, but I would think you would be able to get this to work on the Boxee Box as well by telnetting into it.
Attached Files
File Type: txt hulu.txt (4.7 KB, 512 views)
Reply With Quote
  #5  
Old November 19th, 2010, 09:39 AM
frankboxeetv frankboxeetv is offline
Member
 
Join Date: Apr 2009
Posts: 91
Default

Quote:
Originally Posted by jzongker View Post
You're absolutely right xmcnuggetx, I was making this harder than necessary. Just save the attached file as [Boxeepath]/system/players/flashplayer/hulu.js and it'll do the same thing.

I haven't tried yet, but I would think you would be able to get this to work on the Boxee Box as well by telnetting into it.
This works for me! I got Hulu back. It should work as long as Hulu links stay in the Boxee library.
Reply With Quote
  #6  
Old November 19th, 2010, 02:00 PM
nrune nrune is offline
Member
 
Join Date: Dec 2008
Posts: 80
Default

Yep works thanks!

BTW thanks for the increase is the wife satisfaction scale!

Last edited by nrune; November 19th, 2010 at 03:11 PM.
Reply With Quote
  #7  
Old November 19th, 2010, 07:59 PM
krad krad is offline
Member
 
Join Date: Oct 2010
Posts: 43
Default

Quote:
Originally Posted by jzongker View Post
You're absolutely right xmcnuggetx, I was making this harder than necessary. Just save the attached file as [Boxeepath]/system/players/flashplayer/hulu.js and it'll do the same thing.

I haven't tried yet, but I would think you would be able to get this to work on the Boxee Box as well by telnetting into it.
This worked for me - what a great workaround. Hopefully they (Boxee) will give us the ability to keep Hulu on the PC platform when they go to the newer version on PC, Linux, etc. I am not sure why not since on that same PC you can bring up the Hulu site or the Hulu desktop app.
Reply With Quote
  #8  
Old November 19th, 2010, 11:06 PM
Vandetta Vandetta is offline
Senior Member
 
Join Date: Aug 2010
Posts: 101
Default

From an XBMC team developer regarding if Boxee Box could be hacked to run XBMC

Quote:
Originally Posted by sraue
regarding the specs and docs the OS is installed on the flash (thats the reason its readonly and cant be mounted r/w in any way). Also there is the redboot bootlader installed, which in general supports to load images from network or via a serial. flash chips cant be accessed like normal stoarge devices and must be written with an flashwriter (its handled like the BIOS chips)
Reply With Quote
  #9  
Old November 19th, 2010, 08:17 PM
jjnick jjnick is offline
Junior Member
 
Join Date: Nov 2010
Posts: 1
Default

Quote:
Originally Posted by jzongker View Post
You're absolutely right xmcnuggetx, I was making this harder than necessary. Just save the attached file as [Boxeepath]/system/players/flashplayer/hulu.js and it'll do the same thing.

I haven't tried yet, but I would think you would be able to get this to work on the Boxee Box as well by telnetting into it.
Do you know where this file path might exist on a Mac? I have boxee installed on my Mac and not having Hulu now is a little frustrating. This seems like a great work around
Reply With Quote
  #10  
Old November 19th, 2010, 08:44 PM
Vandetta Vandetta is offline
Senior Member
 
Join Date: Aug 2010
Posts: 101
Default

Should be in the application folder using the same path

/system/players/flashplayer/

Or

~/Library/Application Support/BOXEE/

I only have a OSX machine with Boxee installed at work so maybe someone else can answer that for you. But you could just try to find it using finder searching for "flashplayer"

I think its in Library though. Remember you have to rename the extension of .txt to .js
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:15 PM.


skin based on greenzero from vBSkins.com

 
Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.