Harlin Seritt wrote: > I am trying to use SGMLlib module to extract all links from some data I > pulled from the web (via urllib). I have looked at the documentation > online and can not make sense of it. As a quick example, how would I > get the hyperlinks for an html file?
I know you're not someone to ignore Google, but this looked like a question that could pretty easily be answered using a quick search of the comp.lang.python archives via Google Groups -- and it appears I was right. I tried http://groups.google.ca/groups?q=sgmllib+extract+links+group%3Acomp.lang.python.* and found this page, which I believe should answer your question (perhaps not directly, but it looks basically like an sgmllib tutorial): http://www.oreilly.com/catalog/pythonsl/chapter/ch05.html I'm pretty sure you can find a dozen threads with snippets showing just what you asked if you look at the result of the results. -Peter -- http://mail.python.org/mailman/listinfo/python-list