K
ken.carlino
Hi,
I am new to python regular expression, I would like to use it to get an
attribute of an html element from an html file?
for example, I was able to read the html file using this:
req = urllib2.Request(url=acaURL)
f = urllib2.urlopen(req)
data = f.read()
my question is how can I just get the src attribute value of an img
tag?
something like this:
(.*)<img src="href of the image source">(.*)
I need to get the href of the image source.
Thanks.
I am new to python regular expression, I would like to use it to get an
attribute of an html element from an html file?
for example, I was able to read the html file using this:
req = urllib2.Request(url=acaURL)
f = urllib2.urlopen(req)
data = f.read()
my question is how can I just get the src attribute value of an img
tag?
something like this:
(.*)<img src="href of the image source">(.*)
I need to get the href of the image source.
Thanks.