Beginner Q. interrogate html object OR file search?

inhahe inhahe at gmail.com
Thu Dec 3 00:19:44 EST 2009


or i guess you could go the middle-way and just use regex.
people generally say don't use regex for html (regex can't do the
nesting), but it's what i would do in this case.
though i don't exactly understand the question, re the html file
parsing script you say you have already, or how the date is 'modified
from' the meta-data.

On Wed, Dec 2, 2009 at 10:24 PM, Mark G <markgrahamnz at gmail.com> wrote:
> Hi all,
>
> I am new to python and don't yet know the libraries well. What would
> be the best way to approach this problem: I have a html file parsing
> script - the file sits on my harddrive. I want to extract the date
> modified from the meta-data. Should I read through lines of the file
> doing a string.find to look for the character patterns of the meta-
> tag, or should I use a DOM type library to retrieve the html element I
> want? Which is best practice? which occupies least code?
>
> Regards, Mark
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list