Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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";
}
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.
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. ;-)
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.
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?
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.
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 05:59 PM.
Reason: meant User-Agent, not Referrer
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. ;-)
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.