LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 04-14-2008, 03:59 AM   #301
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76

jkr

Check your email. I uploaded code to my server.

Day finally rolled over to show tomorrow's games. I tried a few and got null url's as I expected. No concurrency errors all day.

Looking good.
 
Old 04-14-2008, 08:15 AM   #302
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
Quote:
available[current_cursor][2] is the event_time, but it's a string. How can I convert this to a struct_time? Specifically, the hour is not zero-padded so I can't use strptime() on it. Should I regex it and zero pad it myself before calling strptime() or is there an easier way?

This question is specifically for the mlbrecord project. I would like to convert event_time and localtime to utc for games in the future and calculate the number of seconds I should sleep before beginning a recording.
Not an issue now. New code parses the time, and available presents a datetime.time object. I haven't added tzinfo to it, but I will soon. That object can then be converted based on the tz in the user's machine or, alternately, to an explicit setting (which might be necessary if the machine's time zone setting is screwed up, i.e. if the user set up the local time as UTC and just isn't converting).
 
Old 04-14-2008, 08:17 AM   #303
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
Quote:
Check your email. I uploaded code to my server.
Great. I have a few questions, which it might be more efficient to discuss over email. But this is great.

Everyone else, look forward to an announcement this evening or tomorrow.

--Jesse
 
Old 04-14-2008, 10:38 AM   #304
Theophile
Member
 
Registered: Jan 2003
Posts: 283

Rep: Reputation: 35
Quote:
Originally Posted by jkr View Post
Everyone else, look forward to an announcement this evening or tomorrow.
Oh, don't worry. I am!
 
Old 04-14-2008, 12:36 PM   #305
Cogs
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
As for cookie support, I'm thinking about creating a new cookie jar each time gamestream is instantiated, but I'll load cookies from the cookie files. There are several cookies that don't contain the discard flag but the session one does.
Hi guys, nice job with this project so far. I started working on getting mlbtv to work in Linux but you've made more progress that I did. I'm an experienced programmer but I don't know Python (yet). I wrote a Perl script a while back to play "Beat the Streak" on mlb.com and figured out how to get around the login issue. I create a cookie jar, ignore all discards, and save the cookies to a file in my home directory. I check if the cookies are valid by hitting enterworkflow.do and seeing if I get the login prompt. If you get the login prompt, you must login. Otherwise, your session is still valid.

Hope it helps. I've had dreams of making a MythTV plugin for mlbtv. Oh, and I'm a White Sox fan.

Code:
#!/usr/bin/perl
use LWP;
use HTTP::Cookies;
use Crypt::SSLeay;

#Login information
#------------------------------------------------------------------------------
$username=shift;
$password=shift;

#create a browser and load mlb cookies from
#------------------------------------------------------------------------------
my $browser = LWP::UserAgent->new;
$cookie_jar = HTTP::Cookies->new(
        file=>"$ENV{'HOME'}/.mlb.cookies",
        autosave=>1,
        ignore_discard=>1);
$cookie_jar->load;
$browser->cookie_jar($cookie_jar);

#If not already logged in, log in
#------------------------------------------------------------------------------
my $authenticateURL="https://secure.mlb.com/authenticate.do";
my $loginURL="https://secure.mlb.com/enterworkflow.do?flowId=registration.wizard&c_id=mlb";

my $response=$browser->get($loginURL);

if ($response->content=~/Login\ or\ Register/){
  print "Attempting to log in...";
  my $loginResponse=$browser->post($authenticateURL,
  [
    "login_reg"=>"Login",
    "uri"=>"\/account\/login_register.jsp",
    "registrationAction"=>"identify",
    "emailAddress"=>"$username",
    "password"=>"$password"
  ],
  );

  if ($loginResponse->content=~/Authentication\ Error/){
    print "authentication error!\n";
  }
  else{
    print "success!\n";
  }
}
else{
  print "Already logged in!\n";
}
 
Old 04-14-2008, 12:46 PM   #306
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
Quote:
Originally Posted by Cogs View Post
Hi guys, nice job with this project so far. I started working on getting mlbtv to work in Linux but you've made more progress that I did. I'm an experienced programmer but I don't know Python (yet). I wrote a Perl script a while back to play "Beat the Streak" on mlb.com and figured out how to get around the login issue. I create a cookie jar, ignore all discards, and save the cookies to a file in my home directory. I check if the cookies are valid by hitting enterworkflow.do and seeing if I get the login prompt. If you get the login prompt, you must login. Otherwise, your session is still valid.

Hope it helps. I've had dreams of making a MythTV plugin for mlbtv. Oh, and I'm a White Sox fan.
That was how we used to do it. A lot of users were getting messages saying they had concurrent sessions and this would block them from being able to watch live games for an hour.

The new code which I wrote this weekend (and I hope it works because I'm just a sample size of one), hits the login page first to get the session key, then logs in against authenticate.do, saving whatever cookies we get from there, and then finally hits enterworkflow.do for the media url. 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.
 
Old 04-14-2008, 12:47 PM   #307
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
Oh, and my code doesn't work for White Sox fans. ;-)

Go Royals!
 
Old 04-14-2008, 04:42 PM   #308
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
It's been awfully quiet in here. Either people aren't using it anymore or they're not having problems with it.

Or they're sick of complaining about concurrent login issues. :-|

When live games start up again tonight, I'm going to see if I can top six concurrent games (which is what Mosaic supports.) My previous record was five because there weren't six live games when I tested.

For those of you annoyed with the "helpful" beta error message, that's going away in the next release. Hopefully, you'll never see what replaced it. ;-)
 
Old 04-14-2008, 05:10 PM   #309
astram
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
It's been awfully quiet in here. Either people aren't using it anymore or they're not having problems with it.

Or they're sick of complaining about concurrent login issues. :-|

When live games start up again tonight, I'm going to see if I can top six concurrent games (which is what Mosaic supports.) My previous record was five because there weren't six live games when I tested.

For those of you annoyed with the "helpful" beta error message, that's going away in the next release. Hopefully, you'll never see what replaced it. ;-)
i've been anonymously watching this thread, just registered an account to reply to you.

i haven't been able to get the script to work, have been running the april 11th version. once i select a game, i get the friendly message, "There was an error (I will be more helpful in the beta)". I emailed jkr about this, and he said it's probably the same problem you guys were running to.

Where can i find a more recent version?
 
Old 04-14-2008, 05:53 PM   #310
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
The more recent version, with daftcat's great work and audio support, will be this evening or tomorrow.

I did respond to your email, though, suggesting you try out the debug version to get to the bottom of your problem. I never heard back. Did you try it, and if so, what did it tell you?
 
Old 04-14-2008, 06:30 PM   #311
turf212
LQ Newbie
 
Registered: Apr 2008
Distribution: Ubuntu, Centos and RedHat.
Posts: 9

Rep: Reputation: 0
Kudos

Just wanted to give my thanks for the continued development of this. I had been getting very frustrated not being able to watch any games. Since I live in the UK TV coverage isnt the best and I certainly dont get to watch my team as much as I'd like.

Looking forward to the update when it comes out.

Now I just need to upgrade to the faster service.
 
Old 04-14-2008, 06:56 PM   #312
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
jkr

I checked out the trunk code earlier today and merged my changes into it locally. I sent you an email on what all I did and where to find the merged files. My merges should be ready for release now (except for a couple minor things I mention in the email) unless you want to hold off on release for audio. Personally, I'm a little nervous that we keep hitting the servers with a "python/urllib" User-Agent so I'd like to release my code without audio support tonight. You and I could test and review the audio code over the next day or two before we release that. Does that sound good?

Last edited by daftcat; 04-14-2008 at 06:59 PM. Reason: meant User-Agent, not Referrer
 
Old 04-14-2008, 07:07 PM   #313
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
What's the syntax for multiple team blackout? My blackout teams are sf and oak, but if I try:

blackout=sf,oak
blackout=sf , oak
blackout=sf oak

None of these work for blacking out both teams. Of course, my new code would catch the blackout message, but sometimes it's nice just to be reminded that there are indeed two teams in the Bay Area. ;-)
 
Old 04-14-2008, 07:10 PM   #314
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,767

Rep: Reputation: 76
Quote:
Originally Posted by daftcat View Post
What's the syntax for multiple team blackout? My blackout teams are sf and oak, but if I try:

blackout=sf,oak
blackout=sf , oak
blackout=sf oak

None of these work for blacking out both teams. Of course, my new code would catch the blackout message, but sometimes it's nice just to be reminded that there are indeed two teams in the Bay Area. ;-)
Ah, I need two blackout lines to get this to work.

blackout=sf
blackout=oak
 
Old 04-14-2008, 07:17 PM   #315
dmandell
Member
 
Registered: Apr 2008
Posts: 30

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
It's been awfully quiet in here. Either people aren't using it anymore or they're not having problems with it.
I just wanted to say that I'm definitely keeping an eye on this, waiting for your release w/ audio support. The lack of chatter on my end isn't from lack of interest, believe me.

Thanks and keep up the amazing work,

d
 
  


Reply

Tags
help, install, installation, instructions, seek, vlc, windows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mlb.com gameday audio stream statmobile Linux - Newbie 6 05-06-2008 11:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 11:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 11:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 03:49 PM


All times are GMT -5. The time now is 08:23 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration