Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

yoda5

getting data off a website

This topic is 5530 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
I did something like that with the winsock API. It''d probably be harder with VB. Maybe there is an HTTP control for VB?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 .

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!