Skip to main content
GameDev.net gamedev.net
🔒 Locked

getting data off a website

Started by yoda5 May 28, 2003 at 3:11 PM 9 replies 850+ views
Original Post
yoda5
yoda5
I am trying to make a program for a friend that will open a website, either a espn.com or ect.. read off the stats of a certain player so I can score his fantasy football league. I have never done this before and was wondering if anyone had an idea on how to do this. I am using visual basic Thanks guys
drslush
drslush
I did something like that with the winsock API. It''d probably be harder with VB. Maybe there is an HTTP control for VB?
yoda5
yoda5
So what did you use to do yours then?
Shannon Barber
Shannon Barber
Web Services!

Doubt ESPN has one, but that''s the whole idea...
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Russell
Russell
Winsock? Use the right tool for the job. There are programs that will do this for you already. wget or curl + grep + sed would do the job very nicely, probably in a single line of code. perl can probably do the same thing via the ''get'' command. I like this shell script better than the C/C++ code you''d have to write. If you wanted to know when cnn.com was last updated, this should do the trick (not tested).
wget www.cnn.com | grep ''Updated'' | sed ''s/^ *//'' | sed ''s/<.*>//g'' 

Of course you''d need the appropriate programs installed (wget, grep, and sed), but they''re free, and open source too.
Fingolfin
Fingolfin
I''ve done it in Perl. Look up LWP and HTTP packages.

Shouldn''t take more than 10 lines or so.

ApochPiQ
ApochPiQ
Unlike everyone else, I''m not going to tell you to do it in *nix *cough cough*

Under project/components, find the entry Microsoft Internet Controls (filename shdocvw.dll) and check it. Drop the Webbrowser control on your form, set Visible=false, and enjoy.
Interim
Interim
You can get WGET, CURL, PERL for Win32. Grep too. Posix tools.

Interim
Dobbs
Dobbs
Does ESPN consistently publish the stats at the same url, in the same format? If they do it won''t be hard but I''m guessing they don''t. And if they don''t no amount of Unix tools is going to help you. There''s really no way of doing this reliably, short of access to an ESPN Web Service (read my mind Magmai, or maybe I read yours) which they probably don''t have (why would they?).

A quick Google did find this site that offers a Web Service for baseball stats, but nothing for football. Keep hunting I guess.
ApochPiQ
ApochPiQ
quote:
Original post by Interim
You can get WGET, CURL, PERL for Win32. Grep too. Posix tools.

Interim


Point taken. But they still aren''t a good answer to the problem, i.e. getting the stuff through VB .
antareus
antareus
If I had to do this in VB I''d slit my wrists.

Install the tools and run them from inside VB then deal with the results. I cannot imagine parsing things in VB.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.