On 13/01/13 16:10, Adel Afzal wrote:
<dogs.html> contains the text "dogs chase cats"
<cats.html> contains the text "cats chase birds"
<pets.html> contains the text "birds don't bother anyone"

I'd like to know how to search the content of those three pages for the
string "cats" in the text body.

Look at the urllib modules in the standard library.
Also Beautiful Soup is a third part module that many find useful for reading HTML, especially if it is not cleanly formatted.

That assumes that although new to python you are familiar with HTML and parsing in general. If not then you may need more hand holding after reading the docs. If so come back with some specific questions so we can gauge your level of understanding and respond accordingly.



--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to