OxbridgeEconomics commited on
Commit
432a546
·
1 Parent(s): bd95ddb
Files changed (1) hide show
  1. utils.py +1 -5
utils.py CHANGED
@@ -236,7 +236,7 @@ def delete_records(item):
236
  def update_content(report):
237
  dynamodb = get_client_connection()
238
  response = dynamodb.update_item(
239
- TableName="article_test",
240
  Key={
241
  'id': {'S': str(report['id'])},
242
  'site': {'S': report['site']}
@@ -253,10 +253,6 @@ def update_content(report):
253
  ':publishDate': {'S': report['publishDate']},
254
  ':link': {'S': report['link']},
255
  ':attachment': {'S': report['attachment']},
256
- # 'authorID': str(report['authorid']),
257
- # 'entityList': report['entitylist'],
258
- # 'sentimentScore': {'N': str(Decimal(str(report['sentimentScore'])).quantize(Decimal('0.01')))},
259
- # 'sentimentLabel': {'S': report['sentimentLabel']},
260
  ':LastModifiedDate': {'S': datetime.now().strftime("%Y-%m-%dT%H:%M:%S")},
261
  ':sentimentScore': {'N': str(Decimal(str(report['sentimentScore'])).quantize(Decimal('0.01')))},
262
  ':sentimentLabel': {'S': report['sentimentLabel']}
 
236
  def update_content(report):
237
  dynamodb = get_client_connection()
238
  response = dynamodb.update_item(
239
+ TableName="article_china",
240
  Key={
241
  'id': {'S': str(report['id'])},
242
  'site': {'S': report['site']}
 
253
  ':publishDate': {'S': report['publishDate']},
254
  ':link': {'S': report['link']},
255
  ':attachment': {'S': report['attachment']},
 
 
 
 
256
  ':LastModifiedDate': {'S': datetime.now().strftime("%Y-%m-%dT%H:%M:%S")},
257
  ':sentimentScore': {'N': str(Decimal(str(report['sentimentScore'])).quantize(Decimal('0.01')))},
258
  ':sentimentLabel': {'S': report['sentimentLabel']}