LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MLB.TV in Linux (https://www.linuxquestions.org/questions/linux-software-2/mlb-tv-in-linux-432479/)

daftcat 04-14-2008 06:19 PM

Wow! This is kind of stupid that third week into the season, there still having service outages. I'd have thought they'd have the kinks worked out by now especially with the number of people asking for their money back in the official forums.

jkr

My merged code that I recently told you about catches this sort of thing and says there was a problem with whatever page it had an exception in urllib2.Request(). The debug option dumps the page to the log file. Looks like the outages they had earlier today helped improve the code so the outages they're having now are handled gracefully. ;-)

jkr 04-14-2008 06:27 PM

Yeah, this is making testing really difficult. Almost like they planned it this way...

I got your files and I'll diff your merges against mine (just because there are a few things I had to do for audio sake, and we might have taken a slightly different route on the debugging config option.) Oh, I also added the ability for the config file to read booleans, so the debugging and show_ options you added will work.

Pretty soon now, guys...

daftcat 04-14-2008 06:31 PM

Quote:

Originally Posted by jkr (Post 3121289)
Yeah, this is making testing really difficult. Almost like they planned it this way...

I got your files and I'll diff your merges against mine (just because there are a few things I had to do for audio sake, and we might have taken a slightly different route on the debugging config option.) Oh, I also added the ability for the config file to read booleans, so the debugging and show_ options you added will work.

Pretty soon now, guys...

Actually, I wouldn't mind if these outages lasts a little longer. I'd like to optimize the network code to handle the meta refresh statements. I'll see what I can do. If they actually get their act together, I'll set up my own test page to give me meta refreshes to test against.

jkr 04-14-2008 06:39 PM

Glass half full type of guy...

Hoth 04-14-2008 06:47 PM

Seems to be just mlb.com's login page which is having all the trouble. Once I exercise extreme patience waiting to login, gameday audio comes up quick and runs smoothly (through the greesemonkey method). Oh well, I'll take Jerry Howarth for today.

daftcat 04-14-2008 06:48 PM

Peachy!

I just added code to catch their "We are undergoing maintenance operations" error page and now they have it fixed, and I'm not getting that page anymore.

Add the lines between the comments to MLBviewer/mlbtv.py:

Code:

        pattern = re.compile(r'Welcome to your personal mlb.com account.')
        if not re.search(pattern,auth_page):
          self.error_str = "Login was unsuccessful."
          # begin patch for maintenance operations
          maint_pat = re.compile(r'We are currently performing maintenance operations')
          if re.search(maint_pat,auth_page):
              self.error_str += "\n\nSite is performing maintenance operations"
          # end patch for maintenance operations
          self.log.write(auth_page)
          raise Exception, self.error_str

You know. I took a sick day to stay home and rest and I've been working on code all day. I got a hold of a live game and I'm going to watch it.

I can add in meta-refresh handling in the next release. Let's get this one out the door tonight. :-)

jkr 04-14-2008 06:56 PM

Just got audio following working. It will play the audio stream of the home team by default. If two teams that are playing are both being followed it will go with the away team, by convention and because the code is cleaner. Sound good?

daftcat 04-14-2008 07:01 PM

Quote:

Originally Posted by jkr (Post 3121307)
Just got audio following working. It will play the audio stream of the home team by default. If two teams that are playing are both being followed it will go with the away team, by convention and because the code is cleaner. Sound good?

You tell me. You're the only one with audio support. :-)

Do you need me to look over the code or is it ready to release? Did you change the workflow url to use the right catCode for Gameday Audio?

I'm itching to release because I want folks to test it to heck!

I have four live games open right now and I'm just waiting for the next two to start.

This is so cool. I'm watching live games again. Most of the weekend I was doing my testing against archived games or watching recorded games so I already knew the outcome.

Cogs 04-14-2008 07:07 PM

Quote:

Originally Posted by daftcat (Post 3120947)
After we've hit that page, we log out and save only the cookies that don't have discard to disk while clearing the jar of the rest. I was able to open five live games at once yesterday (I ran out of live games or I would have gone for more) so it seems like I've got the problem licked.

Why do you need to log out? I haven't fooled with this year's mlb.com, but in past years you could get you account frozen for a short time if you logged in and out too many times. If you saved and re-used the cookies, you could run a script many times in the same mlb.com session. I also used to open multiple streams at once by logging in once, getting the stream urls, and then playing them with mplayer. Are you saying this doesn't work anymore?

I'll do some poking around with what you guys got and let you know if I find anything...

daftcat 04-14-2008 07:17 PM

Site maintenance patch works. I only did it for one page so go ahead and add the same code to the other two pages we hit.

I realized that one of the games I was waiting to start I'm blacked out from so I probably won't get up to 6 live streams at once tonight (even without the outages.)

Then again, from reading the Mosaic forums, that I'm even able to get four open is better than a lot of them are doing. ;-)

daftcat 04-14-2008 07:21 PM

Quote:

Originally Posted by Cogs (Post 3121312)
Why do you need to log out? I haven't fooled with this year's mlb.com, but in past years you could get you account frozen for a short time if you logged in and out too many times. If you saved and re-used the cookies, you could run a script many times in the same mlb.com session. I also used to open multiple streams at once by logging in once, getting the stream urls, and then playing them with mplayer. Are you saying this doesn't work anymore?

I'll do some poking around with what you guys got and let you know if I find anything...

We tried using persistent sessions and ran into the dreaded "Our records show you are logged in from more than one computer." error and a 1 hour ban. I've been banging against their servers logging and logging out for several days now without issue. I'd like to get this new code released so others who were running into this problem more frequently can test it and see if it resolves the problem for them. It's not fun being banned for an hour.

jkr 04-14-2008 07:30 PM

Quote:

Did you change the workflow url to use the right catCode for Gameday Audio?
yep. GameStream initializes with a streamtype attribute, and it checks that at a couple of points.

Quote:

I'm itching to release because I want folks to test it to heck!
Worked fine with last night's changes. Then I merged in the newer change and they went down again, so I don't know. I assume it does, but I can't tell if there's a stupid missing comma or anything until they get going again. The problems might be regional, I dunno.

jkr 04-14-2008 07:33 PM

Daftcat -- check your email. I got your tilded mlbtv file, but not the mlbviewer...

daftcat 04-14-2008 07:36 PM

Quote:

Originally Posted by jkr (Post 3121332)
Daftcat -- check your email. I got your tilded mlbtv file, but not the mlbviewer...

Check yours. I had it in the wrong directory. You can now try the old url I sent or the same base + mlbviewer.py.new if the ~ is giving you problems.

daftcat 04-14-2008 07:50 PM

No wonder why they're having so many problems tonight. They're running a free preview night with no blackouts.


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