OxbridgeEconomics
commited on
Commit
·
57808eb
1
Parent(s):
d038be7
commit
Browse files
utils.py
CHANGED
@@ -242,21 +242,21 @@ def update_content(report):
|
|
242 |
},
|
243 |
UpdateExpression='SET title = :title, titleCN = :titleCN, contentCN = :contentCN, category = :category, author = :author, content = :content, subtitle = :subtitle, publishDate = :publishDate, link = :link, attachment = :attachment, sentimentScore = :sentimentScore, sentimentLabel = :sentimentLabel',
|
244 |
ExpressionAttributeValues={
|
245 |
-
'title': report['title'],
|
246 |
-
'titleCN': report['titleCN'],
|
247 |
-
'contentCN': report['contentCN'],
|
248 |
-
'category': report['category'],
|
249 |
-
'author': report['author'],
|
250 |
-
'content': report['content'],
|
251 |
-
'subtitle': report['subtitle'],
|
252 |
-
'publishDate': report['publishDate'],
|
253 |
-
'link': report['link'],
|
254 |
-
'attachment': report['attachment'],
|
255 |
# 'authorID': str(report['authorid']),
|
256 |
# 'entityList': report['entitylist'],
|
257 |
-
'sentimentScore': Decimal(str(report['sentimentScore'])).quantize(Decimal('0.01')),
|
258 |
-
'sentimentLabel': report['sentimentLabel'],
|
259 |
-
'LastModifiedDate': datetime.now().strftime("%Y-%m-%dT%H:%M:%S"),
|
260 |
# ':sentimentScore': {'N': str(Decimal(str(report['sentimentscore'])).quantize(Decimal('0.01')))},
|
261 |
# ':sentimentLabel': {'S': report['sentimentlabel']}
|
262 |
}
|
|
|
242 |
},
|
243 |
UpdateExpression='SET title = :title, titleCN = :titleCN, contentCN = :contentCN, category = :category, author = :author, content = :content, subtitle = :subtitle, publishDate = :publishDate, link = :link, attachment = :attachment, sentimentScore = :sentimentScore, sentimentLabel = :sentimentLabel',
|
244 |
ExpressionAttributeValues={
|
245 |
+
'title': {'S': report['title']},
|
246 |
+
'titleCN': {'S': report['titleCN']},
|
247 |
+
'contentCN': {'S': report['contentCN']},
|
248 |
+
'category': {'S': report['category']},
|
249 |
+
'author': {'S': report['author']},
|
250 |
+
'content': {'S': report['content']},
|
251 |
+
'subtitle': {'S': report['subtitle']},
|
252 |
+
'publishDate': {'S': report['publishDate']},
|
253 |
+
'link': {'S': report['link']},
|
254 |
+
'attachment': {'S': report['attachment']},
|
255 |
# 'authorID': str(report['authorid']),
|
256 |
# 'entityList': report['entitylist'],
|
257 |
+
'sentimentScore': {'N': Decimal(str(report['sentimentScore'])).quantize(Decimal('0.01'))},
|
258 |
+
'sentimentLabel': {'S': report['sentimentLabel']},
|
259 |
+
'LastModifiedDate': {'S': datetime.now().strftime("%Y-%m-%dT%H:%M:%S")},
|
260 |
# ':sentimentScore': {'N': str(Decimal(str(report['sentimentscore'])).quantize(Decimal('0.01')))},
|
261 |
# ':sentimentLabel': {'S': report['sentimentlabel']}
|
262 |
}
|