[WIP] hbo go
#1
A first attempt at an HBO GO plugin for XBMC. It's very crude, it requires some editing for it to work. A lot of credit goes to XBMCFlicks and renniej for source and ideas.

I've only tested on Windows while using a Uverse login. It will require more work for providers other than Uverse. First I'll explain how this plugin works:

HBO GO requires you to login everytime you launch a browser in order to watch content. I don't know if this is the case with providers other than Uverse, but I suspect it is.

The way I handle this is very crude. I will try to quickly outline how this plugin works:

  1. XBMC scrapes HBO GO for movie information and adds it to its UI, while creating corresponding local .html files that has some javascript and the url of the media source, which is launched in the browser when selected to play through XBMC.

  2. The local .html file contains an Iframe that attempts to load the media source, but fails.

  3. HBOGO kindly checks a cookie of your previous selection of service provider and redirects you to login.
  4. The script uses predefined timeouts to wait and then loads a local login .html file to autologin.
  5. Finally, you are logged in and then are redirected to the media source which autoplays.

You'll need to do the following steps in order to get this plugin to work.

######
Step 1:
######

Make sure XBMC is set up to play .html files as demonstrated by XBMCFlicks here:
http://forum.xbmc.org/showpost.php?p=664064&postcount=2

If you install XBMCFlicks it will be set up.


######
Step 2:
######

Create local login html file.

I tried in vain to dynamicly add javascript to the iframe. Maybe someone else knows how to do it. In the mean time, I just used a local html file.

For users with Uverse, I've included the uverse.html login file. The section you will want to change to add your login credentials is located at:

[0,{userid:'LOGIN@EMAIL',password:'YOURPW'}]

Save the local html file to a path of your choosing, the default I use in this script is:
C:\HBOGO\HBOGO.html

If you choose another filename or path you will need to edit the default.py in your addons/plugin.video.hbogo directory and change the file path in the redirect string to match the path of your local login file.

file:///C:/HBOGO/HBOGO.html

If you have another provider; you'll need to create the autologin page. I find saving the login pages in Chrome is nice since it auto inserts the full path in the form action.

Look at the html source and find the input for the username and password, add a value="YOUR LOGIN NAME" to the username input, and value="YOUR PASSWORD" to the password input, of course replacing with your real credentials. Add any other credentials in the same fashion that your provider may require (Charter requires a zipcode). Insert some javascript at the bottom of the page to autologin. Here are some examples:


<script type="text/javascript" language="JavaScript">
document.forms[0].submit()
</script>

<script type="text/javascript" language="JavaScript">
document.forms["The Form name"].submit()
</script>

<script type="text/javascript" language="JavaScript">
(function(k,f,n){f=document.forms[k[0]];for(n in k[1])f.elements[n].value=k[1][n];f.submit();})({'': [0,{userid:'LOGIN@EMAIL',password:'YOURPW'}]}[location.host]);
</script>


*
TROUBLESHOOTING
*

The first time the plugin is used, you will need to select your provider from the popup drop down list to redirect you to the login page. This will set a cookie, you may have to do this from time to time as the cookie expires.

I've used hardcoded dumb timeouts for the various redirects in the local .html files. These have worked well for me, but you might need to pad the time if the redirects move too fast. The timeouts are in milliseconds. the first redirect waits 12 seconds; the second redirect waits 8 seconds. To change this edit the default.py in your addons/plugin.video.hbogo directory and edit 12000 and 8000 to wait longer.

https://rapidshare.com/files/1718336267/HBOGO.zip
Reply
#2
Was hoping for a little help with DirecTV. I do not have a great understanding of html but I do see where in the code it looks for login and password information via I guess a form. But I'm a little unsure how to or where to replace the input calls. Below I pasted the section as well as a link to the actual full code downloaded as you suggested with chrome.

Thank you for this!

http://pastebin.com/37kpvqW1

Code:
function validateLoginForm(form){
    var errorDivBox = document.getElementById('errorTag');
    var userName = form.username.value;    
    var passWord = form.password.value;    
    var checkBoxId = document.getElementById('rememberCheckboxId');
    errorDivBox.innerHTML = '';
    var submitBtn = document.getElementById('loginSubmitId');
Reply
#3
Logandros Wrote:Was hoping for a little help with DirecTV. I do not have a great understanding of html but I do see where in the code it looks for login and password information via I guess a form. But I'm a little unsure how to or where to replace the input calls. Below I pasted the section as well as a link to the actual full code downloaded as you suggested with chrome.

Thank you for this!

Sorry it took so long to get back to you, try this for DirectTv

replace this line
Code:
<input id="usernameInputId" name="username" class="inputFieldEmail" type="text">

with
Code:
<input id="usernameInputId" name="username" class="inputFieldEmail" type="text" value="EMAIL ADDRESS">
replacing EMAIL ADDRESS with your directv email or which ever one they have.

Also replace the null value in:
Code:
<input name="password" class="inputFieldPass" value="" type="password">
with your password

finally insert
Code:
<script type="text/javascript" language="JavaScript">
document.userInfo.submit.click();
</script>
above <!--[if IE 6]>

I think it should work, let me know if it does or not.
Reply
#4
So just to be clear this is not available in Linux yet? (I can't follow the XBMC Flicks because that says Linux isn't yet supported.)

Thanks!
Reply
#5
I haven't tested it in linux, but since linux has a flash 10 version, I see no reason why it wouldn't work using firefox as the external player (which is what I use in windows). You would need to update the path in default.py for the local autologin html file.
Reply
#6
oneadvent Wrote:So just to be clear this is not available in Linux yet? (I can't follow the XBMC Flicks because that says Linux isn't yet supported.)

Thanks!
Linux will never be supported for XBMC Flicks as long as Netflix uses Microsoft Silverlight as its streaming technology because Micro$oft does not want to make a version that works in Linux. Period. Runs counter to their profit strategy apparently.

Adobe, on the other hand, wants Linux based users for its products and if HBO GO is Flash based it should as mentioned above should in theory work.

Netflix has announced plans to eventually begin using HTML5 compliant streaming, mostly because it wants to support Google's upcoming netbooks which will be running Google's Linux-dervied ChromeOS. But beyond the initial press release last month or so there hasn't been a whisper on when.
Acer Revo 3610 w/ Ubuntu 10.10, Giada Cube Win 7, 2 ATV 1's one w Crystal HD card, UnRaid server w/ SAB/SickBeard/Couch Potato/Transmission, MacBook Pro, Hackintosh Dell Mini 10v
Reply
#7
If you have HBO Go application on your pc or ipad you can use airplayer (now being commited as default) to stream HBO go content to your XBMC install. Smile


With http://trac.xbmc.org/ticket/11794
librtmp getting handshaking we should being seeing a nice application soon, and tons of new applications (justin.tv)


My Ref: HBO GO Script: http://forum.xbmc.org/showthread.php?tid=98371
Reply
#8
I might have to give a shot at editing this for Ubuntu/Linux and use my login for Dish Network. I would even share the zip for all to use if there was a way to dynamically hide my login details. Thanks for all your hard work!
Reply
#9
tdhz77 Wrote:If you have HBO Go application on your pc or ipad you can use airplayer (now being commited as default) to stream HBO go content to your XBMC install. Smile

Do you mean I can stream from my desktop to XBMC rather than using my iPhone?

If so, how is this done?
Reply
#10
Bump. Any word on development of this script? Just throwing out a line.
Reply
#11
skeeto2010 Wrote:Bump. Any word on development of this script? Just throwing out a line.

Not really Sad While type 9 handshaking is now supported, swfverification type 2 is not. Currently I don't see a way to get content to play using XBMC's player.

One will have to use this hacky method of using a browser as an external player until swfverification type 2 is supported or XBMC implements an internal browser.
Reply

Logout Mark Read Team Forum Stats Members Help
[WIP] hbo go1