Linux espn3 plugin - trying to script auto updates of my auth files
#1
Lightbulb 

First off, adore the espn plugin and bluecop in general. It's what let me cut the cord about a year ago, and I've used the plugin far longer than that. It's amazing.

I'm trying to automate the updating of my swid, since I always end up having to dash around before a game starts to log into Verizon in a browser, then log into espn3 (also via browser), hit the /userData URL, and copy the XML to the plugins user data.XML in order to use it for ESPN/espn2 events.

So my idea is to write a script that will be called by cron once a day or so, which will get my new swid, so that whenever I go to play an event on espn/espn2, it will just work.

When I wget http://broadband.espn.go.com/espn3/auth/userData (or http://broadband.espn.go.com/espn3/auth/...format=xml ) it downloads the page, including the xml property showing my ipaddress, but the string where my swid should be is empty.

I've tried a modification to wget that lets you pass a header to mimic a real browser, but it made no difference for the missing swid.

I've tried to parse the default.py for the espn3 plugin, and can see that it's hitting various urls to get things like the swid, cookies, even login info for provider (verizon in my case), but I don't know enough python to either pull out the relevant code to pull out for my bash script, or to create a python script I can call from cron instead.

This may seem minor, but it would make my life so much easier, as nearly every time I want to use the plugin I have to run through all the steps above to get authenticated to ESPN. I've got my login info in the addon settings, but "get new user files" doesn't seem to work. Sometimes it will if I make my username or password intentionally incorrect, or change my provider to a false one, try to open an event (which fails of course), then return and enter my correct provider/login info.

I've got chromium installed, as well as firefox, if that would help in scripted creation and download of my auth files/cookies etc.

Any ideas?
Reply

Logout Mark Read Team Forum Stats Members Help
espn3 plugin - trying to script auto updates of my auth files0