Kodi Community Forum
[RELEASE] ESPN3.com Addon - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: [RELEASE] ESPN3.com Addon (/showthread.php?tid=95053)



- Macpatto - 2011-10-20

hunkyn Wrote:http://forum.xbmc.org/showpost.php?p=895060&postcount=465 follow the steps there. Do not download from the link but instead updated in your existing default.py. Also, login to watchespn.com once through your browser and then go to the userauth url.



Thanks for your info.. But, I have just got it to work with some help from WildBill.

@WilBill

Thanks for your time and effort. Thumbs up!


- Rogue26 - 2011-10-20

WildBill Wrote:http://broadband.espn.go.com/espn3/auth/userData

If you never been to espn3.com then NO SWID will show up.(Dont know about Canada but check to see)

I will send you a default.py if you are able to get a SWID

Any chance I could take you up on your offer for the default.py file? I am able to get my swid ok but for some reason am unable to edit the file and get add-on to function. I have the swid but the af. id shows up as invalid. I tried adding the comcast id but couldn't get it to work so I must be doing something wrong.

Thanks


Replay by Sports - locomot1f - 2011-10-20

espn3.passportproject.org is currently down -- AGAIN!!!

Luckily, we have had someone to step up and host these scripts.

for those of you that are familiar with the script, you can change the instances of the defunct website with this one.

i.e. ->
http://espn3.passportproject.org/10_days.xml

would change to ->
http://espn3.888hh.ru/10_days.xml

there are three instances:

First two in the Categories Section:
Code:
def CATEGORIES():
    mode = 1
    addDir('Live', 'http://espn.go.com/espn3/feeds/live', mode, defaultimage)
    addDir('[color=red]Replay - By Sport', ' http://espn3.888hh.ru/[/color]', 2,
           defaultimage)
    addDir('[color=red]Replay - Previous 10 Days', ' http://espn3.888hh.ru/10_days.xml[/color]', mode,
           defaultimage)
    addDir('Upcoming', 'http://sports-ak.espn.go.com/espn3/feeds/upcoming', mode,
           defaultimage)

and the third in the Replaybysport section:
Code:
def REPLAYBYSPORT(url):
    html = get_html(url)
    match = re.compile('<img src="/icons/text.gif" alt="\[TXT\]"> <a href="(.+?)">(.+?)</a>').findall(html)
    for gurl,name in match:
        if gurl == '10_days.xml':
            pass
        else:
            [color=red]realurl = " http://espn3.888hh.ru/%s" % gurl[/color]
            name = string.split(unescape(name), ".")[0]
            name = name.replace("_", " ")
            name = name.title()
            mode = 1
            addDir(name,realurl, mode, defaultimage)



- Macpatto - 2011-10-23

locomot1f Wrote:espn3.passportproject.org is currently down -- AGAIN!!!

Luckily, we have had someone to step up and host these scripts.

for those of you that are familiar with the script, you can change the instances of the defunct website with this one.

i.e. ->
http://espn3.passportproject.org/10_days.xml

would change to ->
http://espn3.888hh.ru/10_days.xml

there are three instances:

First two in the Categories Section:
Code:
def CATEGORIES():
    mode = 1
    addDir('Live', 'http://espn.go.com/espn3/feeds/live', mode, defaultimage)
    addDir('[color=red]Replay - By Sport', ' http://espn3.888hh.ru/[/color]', 2,
           defaultimage)
    addDir('[color=red]Replay - Previous 10 Days', ' http://espn3.888hh.ru/10_days.xml[/color]', mode,
           defaultimage)
    addDir('Upcoming', 'http://sports-ak.espn.go.com/espn3/feeds/upcoming', mode,
           defaultimage)

and the third in the Replaybysport section:
Code:
def REPLAYBYSPORT(url):
    html = get_html(url)
    match = re.compile('<img src="/icons/text.gif" alt="\[TXT\]"> <a href="(.+?)">(.+?)</a>').findall(html)
    for gurl,name in match:
        if gurl == '10_days.xml':
            pass
        else:
            [color=red]realurl = " http://espn3.888hh.ru/%s" % gurl[/color]
            name = string.split(unescape(name), ".")[0]
            name = name.replace("_", " ")
            name = name.title()
            mode = 1
            addDir(name,realurl, mode, defaultimage)


Thanks locomot1f and for those who stepped up to the plate.. That did it.. Watching Bundesliga as we speak.. Thumbs Up! Nod


- BlueCop - 2011-10-27

I committed an update to add some cable login support. I learned a bit from cable login support from the epixhd plugin.

I have tested this with an Att account and it worked to authorize access on another network.

It only supports these providers.
Comcast
AT&T
Verizon
Time Warner Cable
Bright House Networks
Insight

It will also soon support Cox but their login form is built with javascript so needs some more code. you will see an option for cox already but it won't work.

Those are the only providers I could find login functions for. If there is another provider that does login then let me know and I can try to add support. Sorry I didn't subscribe to the thread so I am behind on the discussions that have happened. I know there are some patched versions around. If anyone wants commit rights to the repo so they can do any patches just let me know.

I will need feedback on if the other cable logins are working. I don't have logins to test for them. I can only confirm AT&T


Configure your provider, username, password, and tick enable login in the settings if you want it to login and use cookies.


If no one objects I am going to working on displaying the games differently so that movie or perhaps tv views are used. We can use the airdate infolabels for the date and time. Plus a descriptive plot could be created with a better layout of the available information.


- haenchensd - 2011-10-27

BlueCop Wrote:I committed an update to add some cable login support. I learned a bit from cable login support from the epixhd plugin.

I have tested this with an Att account and it worked to authorize access on another network.

How about an option just to specify your provider id and SWID? I had this working and now it won't. Going to try to see if I can make the same edits again.


- BlueCop - 2011-10-27

it is contained in your resources/cache/cookies.lwp file now. you could add a custom swid cookie to it.

here is what a cookies.lwp file format looks like

Code:
#LWP-Cookies-2.0
Set-Cookie3: SWID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX"; path="/"; domain=".go.com"; path_spec; domain_dot; expires="2031-10-27 05:33:16Z"; version=0

you could insert a swid there.
change the settings to enabled login but disable clear cookies after you create this cookies.lwp. It won't touch your cookies or attempt to log-in like this.

It shouldn't be needed because you can login with an authorized account.

update
I forgot to include the cache directory in the svn and it didn't create it. this might have caused errors.

I commited an update to relocate cookies.lwp to special://profile/addon_data/plugin.video.espn3/cookies.lwp

It will now persist between updates if one does want to insert a swid.


- haenchensd - 2011-10-27

Perfect, thanks. Will check it out later.


- BlueCop - 2011-10-27

I rewrote most of the listing code.

do people use these passport sites xml files because the espn site won't serve them the lists?
I didn't want to commit anything till I understand why the intermediate site was being used?

I wrote it to cache the complete replay list on launch so it can display replay content quickly. It also takes advantage of the episode listing view display more metadata about the show or event.

I also changed the xml lists a bit by adding station filtering. You can enable or disable stations below. The stations are espn1,espn2,espn3,espnu, and goalline.

Your cable provider has to be authorized to view the espn1, or espn2 content for it to work. Only Verizon, Bright House Networks, and Time Warner Cable support espn1 and espn2.
I am not sure how the ESPNU and Goal Line content is authorized the same.

I haven't committed any listing changes yet. If the passport site is integral somewhere let me know and I will hold off and have an option for them as well.


- barnetty - 2011-10-27

thanks BlueCop I use a COX login so hopefully you will get that working soon.

your work is appreciated!


- FishOil - 2011-10-27

For whatever reason the new version and SWID cookie fix's didnt do it for me.

I went back to the modified default.py and changed my SWID & Affiliate ID

Works well like it did before.


Thanks


- hunkyn - 2011-10-27

BlueCop Wrote:I rewrote most of the listing code.

do people use these passport sites xml files because the espn site won't serve them the lists?
I didn't want to commit anything till I understand why the intermediate site was being used?

I wrote it to cache the complete replay list on launch so it can display replay content quickly. It also takes advantage of the episode listing view display more metadata about the show or event.

I also changed the xml lists a bit by adding station filtering. You can enable or disable stations below. The stations are espn1,espn2,espn3,espnu, and goalline.

Your cable provider has to be authorized to view the espn1, or espn2 content for it to work. Only Verizon, Bright House Networks, and Time Warner Cable support espn1 and espn2.
I am not sure how the ESPNU and Goal Line content is authorized the same.

I haven't committed any listing changes yet. If the passport site is integral somewhere let me know and I will hold off and have an option for them as well.

BC nice work i was planning to email you today about this request after seeing your work on epixhd and you already did it Smile I will test it out tonight on verizon i could not test epix as i do not have epix currently.

I willl keep you posted


- hunkyn - 2011-10-28

BC the new update works just fine with my verizon account no issues on my end.

I found this live feed when i was looking around which brings content from espn1, epsn2, espn3, espnu and espngoalline while i can get most of the streams for some reason some of the events do not have bamcontentid and those i am not able to open. Please take a look at it and let me know if this is possible to implement

http://espn.go.com/watchespn/feeds/startup?action=live&channel=espn1,espn2,espn3,espnu,goalline

the reason why i ask is sometimes i want to watch sportscenter right in xbmc without going back to my TV.


- BlueCop - 2011-10-28

Yeap already using those feeds in my new code. I just need to enable cookies for the xml requests and it will have the ids populated in them.

I will just commit the new listing code later tonight if no one objects.

I am simplify the playnack process. it will grab the userdata at login and store the file.

if people need to modify cookies or swid/affilateid in userdata file they can in this new version. it will also presist between updates. It isn't needed to regrab the various ids before playback when the orginal listings have them. this will reduce the number of requests needed to start playback by a couple and enable users to edit their swid cookies and userdata file.

thanks for the confrimation of verizon login working.

I am working on fixing the cox login which uses javascript for the forms as well.


Update

I want to explain the current listing structure and see if it will work.

Live listing will just list all live events.

Upcoming and Replay items will download and cache their list and list all available sports and an "All" category for all sports.

There are various replay lists limited by timeframe. right now I have 4
10 days, 30 days, 90 days, All videos. I was thinking or making a setting for the first 3 time frames for the user to determine. I am working making a replay by date listing that will allow you to select year and month and see what was played then by sport.

The all videos replay listing is about 3.5mb(is also limited to 3000 items) so will probably only use time limited versions so one can browse quickly and just include the All Replay in enabled in the settings.

If anyone has any ideas to list things better let me know. Here is a screen shot of the current look.
Image
everything look ok? should I change it or add additional info?

I am trying to convert all play times to the local time of the machine being used. Let me know you think it should be done differently.


- hunkyn - 2011-10-28

BC great to here about the new update. As per the listing your changes seems to be great and could not wait to test. I will test out all the sections once you release the new version