comp fetarticle
This commit is contained in:
@@ -89,9 +89,11 @@ def fetarticle(url, raw):
|
|||||||
if h is not None:
|
if h is not None:
|
||||||
d["section"]= "FET - " + h.text.strip()
|
d["section"]= "FET - " + h.text.strip()
|
||||||
|
|
||||||
|
|
||||||
h=sp.find("span", {"itemprop": "datePublished"})
|
h=sp.find("span", {"itemprop": "datePublished"})
|
||||||
if h is not None:
|
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"})
|
h=sp.find("meta", {"property": "og:image"})
|
||||||
if h is not None:
|
if h is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user