OxbridgeEconomics
commited on
Commit
·
7b6960f
1
Parent(s):
606a83f
commit
Browse files
daily.py
CHANGED
@@ -9,7 +9,6 @@ from urllib.parse import urlparse
|
|
9 |
from utils import (encode,
|
10 |
translate,
|
11 |
sentiment_computation,
|
12 |
-
upsert_content,
|
13 |
fetch_url,
|
14 |
extract_from_pdf,
|
15 |
crawl,
|
@@ -56,7 +55,7 @@ while i > -1:
|
|
56 |
article['attachment'] = ''
|
57 |
article['author'] = ''
|
58 |
article['subtitle'] = translate(summary)
|
59 |
-
|
60 |
except Exception as error:
|
61 |
print(error)
|
62 |
|
@@ -123,7 +122,7 @@ while i > -1:
|
|
123 |
article['attachment'] = ""
|
124 |
article['sentimentScore'], article['sentimentLabel'] = sentiment_computation(article['content'])
|
125 |
article['id'] = uuid.uuid5(uuid.NAMESPACE_OID, article['titleCN']+article['publishDate'])
|
126 |
-
|
127 |
except Exception as error:
|
128 |
print(error)
|
129 |
|
|
|
9 |
from utils import (encode,
|
10 |
translate,
|
11 |
sentiment_computation,
|
|
|
12 |
fetch_url,
|
13 |
extract_from_pdf,
|
14 |
crawl,
|
|
|
55 |
article['attachment'] = ''
|
56 |
article['author'] = ''
|
57 |
article['subtitle'] = translate(summary)
|
58 |
+
update_content(article)
|
59 |
except Exception as error:
|
60 |
print(error)
|
61 |
|
|
|
122 |
article['attachment'] = ""
|
123 |
article['sentimentScore'], article['sentimentLabel'] = sentiment_computation(article['content'])
|
124 |
article['id'] = uuid.uuid5(uuid.NAMESPACE_OID, article['titleCN']+article['publishDate'])
|
125 |
+
update_content(article)
|
126 |
except Exception as error:
|
127 |
print(error)
|
128 |
|