LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 04-18-2008, 01:03 AM   #466
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86

Quote:
Originally Posted by Wolfvorkian View Post
I hope you guys keep the script as simple as possible. A toggle for 400k or 800k would be okay but for my particular case, not really necessary. Most of the time 800 craps out on me, so I've seldom bother to even try the faster feeds anymore. I did call to see what the 3Mbs cost and it isn't much more, so If may upgrade but still changing a file isn't much of a problem or too much to ask.

I like simplicity, being able to either watch the games or listen to them is just fine afaic.... that is enough. Making an edit to a config file doesn't bother me any.It is none of my business really because this is your baby but I hope whatever time you guys spend in the future is used to make the existing product bullet proof... that is my druthers.
The intent is to keep the basic interface simple with very little startup knowledge necessary to get it going. However, I'd like to also have powerful tools ready at your disposal should you want to dive in deeper. For example, the listings screen will probably not undergo any more changes except perhaps place a couple visual cues for settings in your config file like [800k] to denote that your default speed is 800k. You might be able to press 'p' (I have other plans for 's') to change your speed on the fly. Of course if you never want to, you never need to.

Beyond the basic interface, I'd like to have a couple other screens you could access (but don't have to.) When highlighting the current game, maybe you could press 'i' and it would bring up a game detail screen. In that screen it would have team records, probable pitchers and their records, and perhaps news hyperlinks for the preview pages. Each game actually has a preview page on MLB for each of the home and away teams. I would like to figure out how to tell Firefox to load a page if it's running or launch it if it's not (or whatever web browser you want to use in the config file.) We could also print linescores but only when requested. I hate spoilers!

Another couple screens I am considering implementing is a scoreboard screen and a standings screen.

I'd also like to support all the video links in the listings we download from mlb.com which would include condensed games and top plays.

My intention is not to clutter anything up with overbearing interfaces and unwieldy config files but rather make power features available for people who want them and completely unused code for people who don't. That's one of the nice things with OOP. If you never press that 'i' key, we'll never pull down the miniscoreboard.xml file that has all that game info and we'll never build the objects and methods to support it in your memory. We don't make it until you order it.

Good things are coming but the basic operation will remain simple.
 
Old 04-18-2008, 01:24 AM   #467
oneil72
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
Are you using a HTTP proxy for web access?

We're going to dive in even deeper and emulate a web browser from the shell:

[code]
matthew@tango:~/mlbtv/svn/mlbviewer/MLBviewer$ telnet mlb.mlb.com 80
Hmmm. This is what I get:

Quote:
brent@pathless:~$ telnet mlb.mlb.com 80
Trying 80.67.74.128...
Connected to a1321.g.akamai.net.
Escape character is '^]'.
HTTP/1.0 408 Request Time-out
Server: AkamaiGHost
Mime-Version: 1.0
Date: Fri, 18 Apr 2008 06:10:39 GMT
Content-Type: text/html
Content-Length: 218
Expires: Fri, 18 Apr 2008 06:10:39 GMT

<HTML><HEAD>
<TITLE>Request Timeout</TITLE>
</HEAD><BODY>
<H1>Request Timeout</H1>
The server timed out while waiting for the browser's request.<P>
Reference #2.7c4a4350.1208499039.0
</BODY></HTML>
Connection closed by foreign host.
I have a super-fast internet connection, so that isn't it and I tried a few other urls instead of mlb.mlb.com and none worked either. Whazza?
 
Old 04-18-2008, 02:44 AM   #468
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by oneil72 View Post
Hmmm. This is what I get:



I have a super-fast internet connection, so that isn't it and I tried a few other urls instead of mlb.mlb.com and none worked either. Whazza?
I don't see your GET request in the output above. You have to copy and paste the lines from GET to Cache-Control (inclusive) and press return twice at the end to denote the end of the headers and submit the request.
 
Old 04-18-2008, 04:45 AM   #469
turf212
LQ Newbie
 
Registered: Apr 2008
Distribution: Ubuntu, Centos and RedHat.
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by hanophix View Post
Am I mistaken here, but I am paying for only the 400k stream, can I still get the 800k with this script?
You can only watch the live 400k stream, but you can get the archived 800k stream. I forgot I had it at 800k and tried to watch a live stream. Comes back with an HTML error. I've since upgraded my service as the quality difference is night an day.
 
Old 04-18-2008, 08:58 AM   #470
oneil72
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
I don't see your GET request in the output above. You have to copy and paste the lines from GET to Cache-Control (inclusive) and press return twice at the end to denote the end of the headers and submit the request.
daftcat: Oh I see. I do get the response you posted earlier when I (do it properly and) insert the lines from GET to Cache-Control. Any other ideas? Thanks for the help.
 
Old 04-18-2008, 11:31 AM   #471
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by oneil72 View Post
daftcat: Oh I see. I do get the response you posted earlier when I (do it properly and) insert the lines from GET to Cache-Control. Any other ideas? Thanks for the help.
So at the core OS level, you're able to communicate with the servers. That's really weird that Python is having trouble. I'm sure you don't find that comforting that we're stumped. Let me do some Google searching and see what I can find. In the meantime, can you see if there's an update for your Python available? 2.5.1 sounds recent but maybe there's something buggy about it that I'm not aware of. Personally, I'm using 2.4.4. No, wait, I'm using 2.5.1 under Cygwin on my Windows machine. I guess that rules out the Python version.

Let me see if I can find something on Google. I'll get back to you. In the meantime, I have tested our code under Windows using Cygwin if you wanted to test that for comparison.
 
Old 04-18-2008, 01:33 PM   #472
hanophix
LQ Newbie
 
Registered: Apr 2008
Posts: 19

Rep: Reputation: 0
Can someone tell me how to get gameday audio?
 
Old 04-18-2008, 01:46 PM   #473
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by hanophix View Post
Can someone tell me how to get gameday audio?
If you're using the code released on Monday, you highlight a game and press 'a'. It defaults to the Home team stream but you can add audio_follow=kc (or whoever your favorite team is) and if that team is playing in one of the game you're listening to, then the audio stream will select that team's audio stream. That way if you like your team's announcers, you'll always listen to them no matter if they are at home or on the road.
 
Old 04-18-2008, 01:51 PM   #474
hanophix
LQ Newbie
 
Registered: Apr 2008
Posts: 19

Rep: Reputation: 0
daftcat Thanks, I figured it out, I am slowly learning Python as well! Cool, I am excited! Go cubbies!

BUT---I am watching it on TV and wanted to listen to the radio feed but MLB.tv audio feed is about 35 seconds behind, LOL....oh well

Last edited by hanophix; 04-18-2008 at 01:53 PM.
 
Old 04-18-2008, 02:00 PM   #475
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
oneil72

This is very strange. The only thing that comes to mind -- like daftcat said -- is that a bug crept into ubuntu's version of python. I'm using gutsy as well, and I'm also using python 2.5..1 and I'm not having any problems, but I also haven't kept up to date with all the updates -- looks like you have.

Still, a web search shows no reports of similar urlerrors, and so many things depend on the modules, I'm sure something would have shown up. But the problem does seem to be in python.

A few more troubleshooting questions:

1. Can you connect with other webpages through python? E.g. run the example with the python interface I gave you earlier with 'http://www.google.com' ?

2. If you run the simple example with urllib instead of urllib2, what happens? (I.e. import urllib, urllib.urlopen, and so on.)
 
Old 04-18-2008, 03:02 PM   #476
hanophix
LQ Newbie
 
Registered: Apr 2008
Posts: 19

Rep: Reputation: 0
Script it working good for me.

Last edited by hanophix; 04-18-2008 at 03:05 PM.
 
Old 04-18-2008, 04:11 PM   #477
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by hanophix View Post
Script it working good for me.
Excellent!

Music to my ears.
 
Old 04-18-2008, 04:12 PM   #478
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Update:

Streams are working better for me today since I added -user-agent NSPlayer to my mplayer options.

It may or may not be related though. Maybe I'm just having a good run of luck right now.
 
Old 04-18-2008, 05:58 PM   #479
oneil72
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by jkr View Post
oneil72

A few more troubleshooting questions:

1. Can you connect with other webpages through python? E.g. run the example with the python interface I gave you earlier with 'http://www.google.com' ?

2. If you run the simple example with urllib instead of urllib2, what happens? (I.e. import urllib, urllib.urlopen, and so on.)
jkr

Hmmm. This is what I get for your 1 and 2 above. You'll notice google.com yields the exact same errors as in my post 459, and urllib just gives errors on different lines. Still no luck. Should I try uninstalling and reinstalling python? Thanks for your help.

Quote:

brent@pathless:~$ python
Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> URL = "http://google.com"
>>> fp = urllib2.urlopen(URL)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.5/urllib2.py", line 381, in open
response = self._open(req, data)
File "/usr/lib/python2.5/urllib2.py", line 399, in _open
'_open', req)
File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
result = func(*args)
File "/usr/lib/python2.5/urllib2.py", line 1107, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (-2, 'Name or service not known')>
>>>
brent@pathless:~$ python
Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> URL = "http://google.com"
>>> fp = urllib.urlopen(URL)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/urllib.py", line 82, in urlopen
return opener.open(url)
File "/usr/lib/python2.5/urllib.py", line 190, in open
return getattr(self, name)(url)
File "/usr/lib/python2.5/urllib.py", line 325, in open_http
h.endheaders()
File "/usr/lib/python2.5/httplib.py", line 856, in endheaders
self._send_output()
File "/usr/lib/python2.5/httplib.py", line 728, in _send_output
self.send(msg)
File "/usr/lib/python2.5/httplib.py", line 695, in send
self.connect()
File "/usr/lib/python2.5/httplib.py", line 663, in connect
socket.SOCK_STREAM):
IOError: [Errno socket error] (-2, 'Name or service not known')
 
Old 04-18-2008, 06:35 PM   #480
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
oneil72

That's what I would recommend. All the Google posts I've seen so far that refer to your error are in regards to proxy servers but you proved via telnet that you're not using a proxy. Try re-installing Python. I'm crossing my fingers for you.
 
  


Reply

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



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 10:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 10:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:17 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration