PHP » PYTHON |
login |
register |
about
|
PYTHON get_meta_tags
is this article helpful?
|
Python replacement for PHP's get_meta_tags
[
edit
| history
]
import urllib2 import re def get_meta_tags(url): out={} html = urllib2.urlopen(url).read() m = re.findall("name=\"([^\"]*)\" content=\"([^\"]*)\"",html) for i in m: out[i[0]] = i[1] return out |
more
Recently updated
more
Most requested
more
Last requests
|