diff --git a/compiler/compiler.py b/compiler/compiler.py index 69a6f91..4543cfa 100644 --- a/compiler/compiler.py +++ b/compiler/compiler.py @@ -89,9 +89,11 @@ def fetarticle(url, raw): if h is not None: d["section"]= "FET - " + h.text.strip() + h=sp.find("span", {"itemprop": "datePublished"}) if h is not None: - d["published"]=parse(h.encode_contents().strip()) + h1= re.sub(r'[^\d]*(\d+)\.(\d+)\.(\d+)[^\d]*', r'\3/\2/\1',unicode(h.text).strip()) + d["published"]=parse(h1.strip()) h=sp.find("meta", {"property": "og:image"}) if h is not None: