comp fetarticle

This commit is contained in:
Andreas Stephanides
2017-01-24 11:43:09 +01:00
parent debf6b0ccc
commit edc643d3da

View File

@@ -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: