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)



- locomot1f - 2011-05-26

is there a way to put the swid in the script?
If I can log in with my PC, is there some way I can transfer the swid credentials to the script for XBMC?


- BlueCop - 2011-05-26

locomot1f: You would want to get the needed cookies and add them in the request headers. it would probably work then. I haven't been able to figure out any of the login info. I have been trying to proxy out to have it require to log me in but have had problems getting it working right.


- locomot1f - 2011-05-26

would you happen to know which cookies?

If I can be of any assistance with the troubleshooting, please let me know.

I don't know if you've seen my earlier posts about how I'm able to login. If you need any further information, I'm available.

I'll even share my login info with you if you think that will help.


hope this helps in some way.... - locomot1f - 2011-05-26

Have you tried to go through this link?
http://espn.go.com/espnnetworks/index?launchPlayer=true&channel=espn1

logging in through this page seems to work better than trying to login in through ESPN3's website directly.

Also, using wireshark I've been able to find my SWID, but I'm having trouble finding reference to this link from the plugin script (line 214):
https://espn-ws.bamnetworks.com/pubajaxws/bamrest/MediaService2_0/op-findUserVerifiedEvent/v-2.1

It would seem, correct me if I'm wrong, that the error
Code:
IndexError: list index out of range
is saying that there is something missing from the authurl array.

when running wireshark, I've found this information:
Code:
ud={'localAdAccountId':'null', 'website':'http://www.timewarnercable.com/contact', 'name':'twc', 'image':'twc.png', 'redirect':''}

then down further, after some header information, this:
Code:
<?xml version="1.0" encoding="UTF-8"?>

<user>
.<affiliate>
..<name>twc</name>
..<imageUrl><![CDATA[http://a.espncdn.com/espn360/images/affiliates/twc.png]]></imageUrl>
..<websiteUrl><![CDATA[http://www.timewarnercable.com/contact]]></websiteUrl>
..<localAdAccountId>null</localAdAccountId>
.</affiliate>

.<location>
..<ip>76.189.112.89</ip>
..<country>united states</country>
..<city>strongsville</city>
..<state>ohio</state>
..<continent>na</continent>
..<dma>17</dma>
..<zipCode></zipCode>
..<domain>rr.com</domain>
.</location>

.<personalization loginStatus="Anonymous Guest" swid="{71282733-F76E-4F13-B32D-928197A2E59D}">
..<username></username>
.</personalization>
</user>

This was in my TCP Stream when i followed this path:
GET /espn3/auth/userData?format=json HTTP/1.1

I don't know if this stuff helps:
here's my -> SWID=71282733-F76E-4F13-B32D-928197A2E59D


- locomot1f - 2011-05-26

BlueCop, you're a genuis!!!

I put my SWID in the header and it's working for me now!!!!!

Code:
req.add_header('Cookie',
                   'SWID=71282733-F76E-4F13-B32D-928197A2E59D')

I don't know if my SWID will work for other people, if so, feel free to use it!


- thrillerbee - 2011-05-27

This worked for me! Much thanks!


- ksosez - 2011-05-27

Well played guys looks like its working. We will probably have to regenerate these ids periodically.


- activate - 2011-05-27

Code:
req.add_header('Cookie',
                   'SWID=71282733-F76E-4F13-B32D-928197A2E59D')



Could someone pls indicate which file this code needs to ne entered, thank you.


adding cookie header - locomot1f - 2011-05-27

In the default.py file of the addon, go down to line 276. You should see this line in the code:
Code:
req.add_header('User-Agent',
                   'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')

directly under this line put in this line of code:
Code:
req.add_header('Cookie',
                   'SWID=71282733-F76E-4F13-B32D-928197A2E59D')

hope this helps everyone.

ksosez is right. i'm not sure how long the cookie will last. but if for chance it's not working, i should be able to regenerate the cookie again.


- wilsonrdfl - 2011-05-27

Nevermind


- emilsvennesson - 2011-05-28

Can't seem to get it working. After adding the code I keep getting "Script failed" when I try it. I'm sure I did right.

This is the error (from xbmc.log)

Quote:INFO: -->Python script returned the following error<--
ERROR: Error Type: exceptions.SyntaxError

ERROR: Error Contents: ('invalid syntax', ('C:\\Users\\***\\AppData\\Roaming\\XBMC\\addons\\plugin.video.espn3\\default.py', 279, 4, ' try:\n'))

ERROR: File "C:\Users\****\AppData\Roaming\XBMC\addons\plugin.video.espn3\default.py", line 279
try:
^
SyntaxError: invalid syntax

And this is how it looks:

Quote:req.add_header('User-Agent',
' Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
req.add_header('Cookie','SWID=71282733-F76E-4F13-B32D-928197A2E59D')
try:



tabs and spacing - locomot1f - 2011-05-28

tabs and spacing, i have found, can be tricky when dealing with python. python is very sensitive to these things.

try typing it straight out -- no cut and paste,
and be sure to add the tabs so that the Cookie line looks exactly like the User Agent line

good luck!


- activate - 2011-05-28

locomot1f Wrote:In the default.py file of the addon, go down to line 276. You should see this line in the code:
Code:
req.add_header('User-Agent',
                   'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')

directly under this line put in this line of code:
Code:
req.add_header('Cookie',
                   'SWID=71282733-F76E-4F13-B32D-928197A2E59D')

hope this helps everyone.

ksosez is right. i'm not sure how long the cookie will last. but if for chance it's not working, i should be able to regenerate the cookie again.

Thanks Locomot1f, I will give it a shot tomorrow Big Grin


- emilsvennesson - 2011-05-28

locomot1f Wrote:tabs and spacing, i have found, can be tricky when dealing with python. python is very sensitive to these things.

try typing it straight out -- no cut and paste,
and be sure to add the tabs so that the Cookie line looks exactly like the User Agent line

good luck!

Just tried that out aswell, didn't work either. Sad Weird!


- ludwich - 2011-05-28

Is there anyway i can fix epsn3 on the atv2 ? I get script error When i try to start à stream but i can see all streamsSad fast reply would be nice. Barca tonightSmile