First post!

Geoff Gerrietts geoff at gerrietts.net
Fri Mar 29 19:10:58 EST 2002


Quoting Zutroi Zatatakowski (abou at cam.org):
> I play a MUD called Core 2651 (http://coremurd.org) and in this MUD,
> there is a stock market. The various prices are all on the website and
> are updated every once in a while. So basically, I want a script that
> checks the page for the prices and print the output in a text file. 
> I've never done anything that touches the web or internet so I'm really
> puzzled. I'm not asking for someone to write it for me (don't spoil the
> fun :) but maybe there already are some scripts like that somewhere...
> Scripts that parse (is that right?) through a page and get different
> infos.

Check out urllib for retrieving the page:
    http://www.python.org/doc/2.2p1/lib/module-urllib.html

Check out string and re for parsing the page to grab the stuff you
want:
    http://www.python.org/doc/2.2p1/lib/module-string.html
    http://www.python.org/doc/2.2p1/lib/module-re.html

If that's not enough to get you productive, let me know where you're
having specific stopping points.

--G.

-- 
Geoff Gerrietts             "A little sincerity is a dangerous thing, 
geoff @ gerrietts.net        and a great deal of it is absolutely fatal." 
http://www.gerrietts.net/                           --Oscar Wilde




More information about the Python-list mailing list