|
|
@@ -5,6 +5,7 @@ import newspaper
|
|
|
import pymongo
|
|
|
import htmlmin
|
|
|
import feedparser
|
|
|
+import datetime
|
|
|
from frontpage import FrontPage
|
|
|
from newspaper import Article
|
|
|
from db import db
|
|
|
@@ -63,6 +64,7 @@ class News():
|
|
|
|
|
|
a.authors=self.dedup([self.fix_author(value) for value in a.authors if not self.isComment(value) and not self.isNoise(value)])
|
|
|
|
|
|
+ self.SCRAP_DATE=datetime.datetime.now()
|
|
|
self.AUTHORS=a.authors
|
|
|
self.PUBLISH_DATE=a.publish_date
|
|
|
self.SUMMARY=a.summary
|
|
|
@@ -124,3 +126,5 @@ for s in d.sources():
|
|
|
print(a)
|
|
|
print(len(l.links))
|
|
|
n=News(l.links[0])
|
|
|
+ print(n.get())
|
|
|
+ break
|