All pastes #759902 Raw Edit

leleobhz

public python v1 · immutable
·published 2007-11-03 16:44 UTC
rendered paste body
                # <!-- Globo.com Fri Nov 02 23:35:59 BRST 2007 -->                html = urllib.urlopen("http://jornalnacional.globo.com/Jornalismo/JN/0,,3586,00.html").read()                data=re.findall(r'<!-- Globo.com (.*) -->', html)                data=time.strptime(str(data), "['%a %b %d %H:%M:%S %Z %Y']")                # Data = ['Fri Nov 02 23:35:59 BRST 2007']                data = time.strftime("%Y%m%d", data))